hedgewars/uGame.pas
changeset 2948 3f21a9dc93d0
parent 2814 71e80c6e74bb
child 3407 dcc129c4352e
equal deleted inserted replaced
2947:803b277e4894 2948:3f21a9dc93d0
    32 procedure DoGameTick(Lag: LongInt);
    32 procedure DoGameTick(Lag: LongInt);
    33 var i: LongInt;
    33 var i: LongInt;
    34 begin
    34 begin
    35 if isPaused then exit;
    35 if isPaused then exit;
    36 if (not CurrentTeam^.ExtDriven) then
    36 if (not CurrentTeam^.ExtDriven) then
    37 	begin
    37     begin
    38 	NetGetNextCmd; // its for the case of receiving "/say" message
    38     NetGetNextCmd; // its for the case of receiving "/say" message
    39 	isInLag:= false;
    39     isInLag:= false;
    40 	SendKeepAliveMessage(Lag)
    40     SendKeepAliveMessage(Lag)
    41 	end;
    41     end;
    42 if Lag > 100 then Lag:= 100
    42 if Lag > 100 then Lag:= 100
    43 else if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then Lag:= 2500;
    43 else if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then Lag:= 2500;
    44 if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10;
    44 if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10;
    45 
    45 
    46 i:= 1;
    46 i:= 1;