Skip to content

Commit

Permalink
fix LEFTTEAM
Browse files Browse the repository at this point in the history
  • Loading branch information
gajop committed May 6, 2015
1 parent b9a4322 commit 213aa7e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lobby/wrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,14 @@ function Wrapper:_OnLeftTeam(obj)
if userName == self.myUserName then
self.team = nil
else
table.remove(self.team, userName)
for i, v in pairs(self.team.users) do
if v == userName then
table.remove(self.team.users, i)
break
end
end
end
self:super("OnLeftTeam", obj)
self:super("_OnLeftTeam", obj)
end
Wrapper.jsonCommands["LEFTTEAM"] = Wrapper._OnLeftTeam

Expand Down

0 comments on commit 213aa7e

Please sign in to comment.