changeset 4436 | 94c948a92759 |
parent 4417 | 6bf00d99fc47 |
child 4438 | 39ab70b37e01 |
4366:d19adc635c99 | 4436:94c948a92759 |
---|---|
24 procedure DoGameTick(Lag: LongInt); |
24 procedure DoGameTick(Lag: LongInt); |
25 |
25 |
26 //////////////////// |
26 //////////////////// |
27 implementation |
27 implementation |
28 //////////////////// |
28 //////////////////// |
29 uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile, uVisualGears; |
29 uses uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile, uVisualGears, uTypes, uVariables; |
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 exit; |
34 if isPaused then exit; |
43 if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10; |
43 if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10; |
44 |
44 |
45 i:= 1; |
45 i:= 1; |
46 while (GameState <> gsExit) and (i <= Lag) do |
46 while (GameState <> gsExit) and (i <= Lag) do |
47 begin |
47 begin |
48 ScriptCall('onGameTick'); |
|
49 if not CurrentTeam^.ExtDriven then |
48 if not CurrentTeam^.ExtDriven then |
50 begin |
49 begin |
51 if CurrentHedgehog^.BotLevel <> 0 then ProcessBot; |
50 if CurrentHedgehog^.BotLevel <> 0 then ProcessBot; |
52 ProcessGears |
51 ProcessGears |
53 end else |
52 end else |