forked from mtcontrib/3d_armor
		
	Do not drop armor in uloaded areas
This commit is contained in:
		@@ -449,8 +449,11 @@ armor.get_valid_player = function(self, player, msg)
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
armor.drop_armor = function(pos, stack)
 | 
					armor.drop_armor = function(pos, stack)
 | 
				
			||||||
	local obj = minetest.add_item(pos, stack)
 | 
						local node = minetest.get_node_or_nil(pos)
 | 
				
			||||||
	if obj then
 | 
						if node then
 | 
				
			||||||
		obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)})
 | 
							local obj = minetest.add_item(pos, stack)
 | 
				
			||||||
 | 
							if obj then
 | 
				
			||||||
 | 
								obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)})
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user