Don't spam traffic in network game
authorunc0rr
Thu, 13 Dec 2007 15:45:31 +0000
changeset 651 3710058bbd53
parent 650 14400b47ed6e
child 652 4cca0c7de609
Don't spam traffic in network game
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Thu Dec 13 14:34:13 2007 +0000
+++ b/hedgewars/uGears.pas	Thu Dec 13 15:45:31 2007 +0000
@@ -417,12 +417,12 @@
         end;
 
 if TurnTimeLeft > 0 then
-   if CurrentTeam <> nil then
       if CurrentHedgehog^.Gear <> nil then
          if ((CurrentHedgehog^.Gear^.State and gstAttacking) = 0)
             and not isInMultiShoot then dec(TurnTimeLeft);
 
-if (GameTicks and $FFFF) = $FFFF then SendIPCTimeInc;
+if (not CurrentTeam^.ExtDriven) and
+   ((GameTicks and $FFFF) = $FFFF) then SendIPCTimeInc;
 inc(GameTicks)
 end;