fix nil value when trying to move players

master
BremaWeb 2013-03-16 09:17:49 -05:00
parent 6f36617628
commit 2e19ae862a
1 changed files with 4 additions and 2 deletions

View File

@ -164,8 +164,10 @@ function domination.start_game()
minetest.log("action","Move player "..tostring(p))
local pl = minetest.env:get_player_by_name(p)
pl:set_hp(20)
pl:moveto(pos)
if ( pl ~= nil ) then
pl:set_hp(20)
pl:moveto(pos)
end
end
end