forked from mtcontrib/mobs_redo
		
	add nil check to general_attack
This commit is contained in:
		
							
								
								
									
										2
									
								
								api.lua
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								api.lua
									
									
									
									
									
								
							@@ -1831,7 +1831,7 @@ function mob_class:general_attack()
 | 
				
			|||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	local s = self.object:get_pos()
 | 
						local s = self.object:get_pos() ; if not s then return end
 | 
				
			||||||
	local objs = minetest.get_objects_inside_radius(s, self.view_range)
 | 
						local objs = minetest.get_objects_inside_radius(s, self.view_range)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- remove entities we aren't interested in
 | 
						-- remove entities we aren't interested in
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user