Fix a source of desync caused by player quit
authorunc0rr
Sun, 31 May 2009 15:17:03 +0000
changeset 2134 cde30c8539bb
parent 2133 1a6570dd45d8
child 2135 0b7972dfad01
Fix a source of desync caused by player quit
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sun May 31 09:56:21 2009 +0000
+++ b/hedgewars/uGears.pas	Sun May 31 15:17:03 2009 +0000
@@ -612,11 +612,13 @@
 				dec(TurnTimeLeft)
 				end;
 
-if (not CurrentTeam^.ExtDriven) and
-	((GameTicks and $FFFF) = $FFFF) then
+if ((GameTicks and $FFFF) = $FFFF) then
 	begin
-	SendIPCTimeInc;
-	inc(hiTicks) // we do not recieve a message for this
+	if (not CurrentTeam^.ExtDriven) then
+		SendIPCTimeInc;
+
+	if (not CurrentTeam^.ExtDriven) or CurrentTeam^.hasGone then
+		inc(hiTicks) // we do not recieve a message for this
 	end;
 
 inc(GameTicks)