equal
deleted
inserted
replaced
165 |
165 |
166 procedure ProcessGears; |
166 procedure ProcessGears; |
167 var t: PGear; |
167 var t: PGear; |
168 i, AliveCount: LongInt; |
168 i, AliveCount: LongInt; |
169 s: shortstring; |
169 s: shortstring; |
170 begin |
170 prevtime: LongWord; |
|
171 begin |
|
172 prevtime:= TurnTimeLeft; |
171 ScriptCall('onGameTick'); |
173 ScriptCall('onGameTick'); |
172 if GameTicks mod 20 = 0 then ScriptCall('onGameTick20'); |
174 if GameTicks mod 20 = 0 then ScriptCall('onGameTick20'); |
173 if GameTicks = NewTurnTick then |
175 if GameTicks = NewTurnTick then |
174 begin |
176 begin |
175 ScriptCall('onNewTurn'); |
177 ScriptCall('onNewTurn'); |
461 |
463 |
462 if (not CurrentTeam^.ExtDriven) or CurrentTeam^.hasGone then |
464 if (not CurrentTeam^.ExtDriven) or CurrentTeam^.hasGone then |
463 inc(hiTicks) // we do not recieve a message for this |
465 inc(hiTicks) // we do not recieve a message for this |
464 end; |
466 end; |
465 AddRandomness(CheckSum); |
467 AddRandomness(CheckSum); |
466 |
468 TurnClockActive:= prevtime <> TurnTimeLeft; |
467 inc(GameTicks) |
469 inc(GameTicks) |
468 end; |
470 end; |
469 |
471 |
470 //Purpose, to reset all transient attributes toggled by a utility and clean up various gears and effects at end of turn |
472 //Purpose, to reset all transient attributes toggled by a utility and clean up various gears and effects at end of turn |
471 //If any of these are set as permanent toggles in the frontend, that needs to be checked and skipped here. |
473 //If any of these are set as permanent toggles in the frontend, that needs to be checked and skipped here. |