Don't pick up own team if only recieved synced teamback message. Fixes second rejoin desync (untested).
authorunc0rr
Fri, 04 Jul 2014 22:45:59 +0400
changeset 10350 4e919f7b9d92
parent 10349 a51de45dcc42
child 10351 0eff41e9f63f
Don't pick up own team if only recieved synced teamback message. Fixes second rejoin desync (untested).
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Wed Jul 02 23:55:00 2014 +0400
+++ b/hedgewars/uTeams.pas	Fri Jul 04 22:45:59 2014 +0400
@@ -704,12 +704,13 @@
                 AddChatString('** '+ TeamName + ' is back');
                 if not CurrentTeam^.ExtDriven then SendIPC(_S'g' + s);
                 hasGone:= false;
-                isGoneFlagPengingToBeUnset:= false;
 
                 RecountTeamHealth(TeamsArray[t]);
 
-                if Owner = UserNick then
-                    ExtDriven:= false
+                if isGoneFlagPengingToBeUnset and (Owner = UserNick) then
+                    ExtDriven:= false;
+
+                isGoneFlagPengingToBeUnset:= false;
                 end;
         end
     else