hedgewars/uGame.pas
changeset 281 5b483aa9f2ab
parent 196 993cf173218b
child 351 29bc9c36ad5f
equal deleted inserted replaced
280:4d6e365befc1 281:5b483aa9f2ab
    29 
    29 
    30 procedure DoGameTick(Lag: integer);
    30 procedure DoGameTick(Lag: integer);
    31 const SendEmptyPacketTicks: LongWord = 0;
    31 const SendEmptyPacketTicks: LongWord = 0;
    32 var i: integer;
    32 var i: integer;
    33 begin
    33 begin
       
    34 if isPaused then exit;
    34 if not CurrentTeam.ExtDriven then
    35 if not CurrentTeam.ExtDriven then
    35    begin
    36    begin
    36    NetGetNextCmd; // its for the case when receiving "/say" message
    37    NetGetNextCmd; // its for the case when receiving "/say" message
    37    isInLag:= false;
    38    isInLag:= false;
    38    inc(SendEmptyPacketTicks, Lag);
    39    inc(SendEmptyPacketTicks, Lag);
    40       begin
    41       begin
    41       SendIPC('+');
    42       SendIPC('+');
    42       SendEmptyPacketTicks:= 0
    43       SendEmptyPacketTicks:= 0
    43       end
    44       end
    44    end;
    45    end;
    45 
       
    46 if Lag > 100 then Lag:= 100
    46 if Lag > 100 then Lag:= 100
    47 else if GameType = gmtSave then Lag:= 2500;
    47 else if GameType = gmtSave then Lag:= 2500;
    48 
    48 
    49 i:= 1;
    49 i:= 1;
    50 while (GameState <> gsExit) and (i <= Lag) do
    50 while (GameState <> gsExit) and (i <= Lag) do