Fix network game bug caused by recent protocol changes
authorunc0rr
Thu, 13 Dec 2007 22:46:36 +0000
changeset 656 6d6d9d7b1054
parent 655 e58a77556878
child 657 b34fc518a48a
Fix network game bug caused by recent protocol changes
hedgewars/uGears.pas
hedgewars/uIO.pas
--- a/hedgewars/uGears.pas	Thu Dec 13 22:24:06 2007 +0000
+++ b/hedgewars/uGears.pas	Thu Dec 13 22:46:36 2007 +0000
@@ -422,7 +422,12 @@
             and not isInMultiShoot then dec(TurnTimeLeft);
 
 if (not CurrentTeam^.ExtDriven) and
-   ((GameTicks and $FFFF) = $FFFF) then SendIPCTimeInc;
+   ((GameTicks and $FFFF) = $FFFF) then
+   begin
+   SendIPCTimeInc;
+   inc(hiTicks) // we do not recieve a message for it
+   end;
+
 inc(GameTicks)
 end;
 
--- a/hedgewars/uIO.pas	Thu Dec 13 22:24:06 2007 +0000
+++ b/hedgewars/uIO.pas	Thu Dec 13 22:46:36 2007 +0000
@@ -34,6 +34,8 @@
 procedure CloseIPC;
 procedure NetGetNextCmd;
 
+var hiTicks: Word = 0;
+
 implementation
 uses uConsole, uConsts, uWorld, uMisc, uLand;
 const isPonged: boolean = false;
@@ -55,8 +57,6 @@
      headcmd: PCmd = nil;
      lastcmd: PCmd = nil;
 
-     hiTicks: Word = 0;
-
 function AddCmd(Time: Longword; str: shortstring): PCmd;
 var Result: PCmd;
 begin