hedgewars/uGame.pas
changeset 7418 f611ee4760c0
parent 7414 a9f18c66ce34
child 7442 9bb6abdb5675
--- a/hedgewars/uGame.pas	Sun Jul 22 00:48:48 2012 +0400
+++ b/hedgewars/uGame.pas	Sat Jul 21 17:51:51 2012 -0400
@@ -26,7 +26,7 @@
 ////////////////////
     implementation
 ////////////////////
-uses Math, uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, uVisualGears, uTypes, uVariables{$IFDEF SDL13}, uTouch{$ENDIF};
+uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, uVisualGears, uTypes, uVariables{$IFDEF SDL13}, uTouch{$ENDIF};
 
 procedure DoGameTick(Lag: LongInt);
 var i: LongInt;
@@ -46,7 +46,14 @@
 
 if (GameType = gmtDemo) then 
     if isSpeed then
-        Lag:= Lag * max(min(round(((GameTicks-SpeedStart)+100)/5000),100),5)
+        begin
+            i:= RealTicks-SpeedStart;
+            if i < 2000 then Lag:= Lag*5
+            else if i < 4000 then Lag:= Lag*10
+            else if i < 6000 then Lag:= Lag*20
+            else if i < 8000 then Lag:= Lag*40
+            else Lag:= Lag*80;
+        end
     else
         if cOnlyStats then
             Lag:= High(LongInt);