hedgewars/uGame.pas
changeset 7414 a9f18c66ce34
parent 7061 4e0fc59ab1ce
child 7418 f611ee4760c0
equal deleted inserted replaced
7412:9e5aa3c8dc62 7414:a9f18c66ce34
    24 procedure DoGameTick(Lag: LongInt);
    24 procedure DoGameTick(Lag: LongInt);
    25 
    25 
    26 ////////////////////
    26 ////////////////////
    27     implementation
    27     implementation
    28 ////////////////////
    28 ////////////////////
    29 uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, uVisualGears, uTypes, uVariables{$IFDEF SDL13}, uTouch{$ENDIF};
    29 uses Math, uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, uVisualGears, uTypes, uVariables{$IFDEF SDL13}, uTouch{$ENDIF};
    30 
    30 
    31 procedure DoGameTick(Lag: LongInt);
    31 procedure DoGameTick(Lag: LongInt);
    32 var i: LongInt;
    32 var i: LongInt;
    33 begin
    33 begin
    34 if isPaused then
    34 if isPaused then
    44 else if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then
    44 else if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then
    45     Lag:= 2500;
    45     Lag:= 2500;
    46 
    46 
    47 if (GameType = gmtDemo) then 
    47 if (GameType = gmtDemo) then 
    48     if isSpeed then
    48     if isSpeed then
    49         Lag:= Lag * 10
    49         Lag:= Lag * max(min(round(((GameTicks-SpeedStart)+100)/5000),100),5)
    50     else
    50     else
    51         if cOnlyStats then
    51         if cOnlyStats then
    52             Lag:= High(LongInt);
    52             Lag:= High(LongInt);
    53 PlayNextVoice;
    53 PlayNextVoice;
    54 i:= 1;
    54 i:= 1;