changeset 917 | e59614bffc3f |
parent 909 | 122c1b57bbf3 |
child 1066 | 1f1b3686a2b0 |
916:1d0022336fbb | 917:e59614bffc3f |
---|---|
20 interface |
20 interface |
21 uses uFloat; |
21 uses uFloat; |
22 {$INCLUDE options.inc} |
22 {$INCLUDE options.inc} |
23 |
23 |
24 procedure DoGameTick(Lag: LongInt); |
24 procedure DoGameTick(Lag: LongInt); |
25 |
|
26 var skipFlag: boolean = false; |
|
25 |
27 |
26 //////////////////// |
28 //////////////////// |
27 implementation |
29 implementation |
28 //////////////////// |
30 //////////////////// |
29 uses uMisc, uConsts, uWorld, uKeys, uTeams, uIO, uAI, uGears, uConsole; |
31 uses uMisc, uConsts, uWorld, uKeys, uTeams, uIO, uAI, uGears, uConsole; |
49 if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10; |
51 if (GameType = gmtDemo) and isSpeed then Lag:= Lag * 10; |
50 |
52 |
51 i:= 1; |
53 i:= 1; |
52 while (GameState <> gsExit) and (i <= Lag) do |
54 while (GameState <> gsExit) and (i <= Lag) do |
53 begin |
55 begin |
56 skipFlag:= false; |
|
54 if not CurrentTeam^.ExtDriven then |
57 if not CurrentTeam^.ExtDriven then |
55 begin |
58 begin |
56 if CurrentHedgehog^.BotLevel <> 0 then ProcessBot; |
59 if CurrentHedgehog^.BotLevel <> 0 then ProcessBot; |
57 ProcessGears |
60 ProcessGears |
58 end else |
61 end else |
73 GameType:= gmtLocal |
76 GameType:= gmtLocal |
74 end; |
77 end; |
75 end |
78 end |
76 else ProcessGears |
79 else ProcessGears |
77 end; |
80 end; |
81 if skipFlag then TurnTimeLeft:= 0; |
|
78 inc(i) |
82 inc(i) |
79 end |
83 end |
80 end; |
84 end; |
81 |
85 |
82 end. |
86 end. |