branch | experimental3D |
changeset 4812 | f924be23ffb4 |
parent 4438 | 39ab70b37e01 |
child 4976 | 088d40d8aba2 |
4347:0ddb100fea61 | 4812:f924be23ffb4 |
---|---|
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, 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 |