Fix remove player bug

master
rubenwardy 2015-07-14 15:33:52 +01:00
parent cb7f00cd11
commit dd4a35f376
1 changed files with 2 additions and 1 deletions

View File

@ -101,9 +101,10 @@ function ctf.player_or_nil(name)
end
function ctf.remove_player(name)
ctf.log("team", "Removing player ".. dump(name))
local player = ctf.players[name]
if player then
local team = ctf.team(ctf.players.team)
local team = ctf.team(player.team)
if team then
team.players[name] = nil
end