branch | experimental3D |
changeset 4343 | 19cbea33e4d2 |
parent 4075 | f7412772f85d |
child 4357 | a1fcfc341a52 |
4006:45b63c2a694f | 4343:19cbea33e4d2 |
---|---|
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; |
29 uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile, uVisualGears; |
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; |
53 end else |
53 end else |
54 begin |
54 begin |
55 NetGetNextCmd; |
55 NetGetNextCmd; |
56 if isInLag then |
56 if isInLag then |
57 case GameType of |
57 case GameType of |
58 gmtNet: break; |
58 gmtNet: begin |
59 // just update the health bars |
|
60 AddVisualGear(0, 0, vgtTeamHealthSorter); |
|
61 break; |
|
62 end; |
|
59 gmtDemo: begin |
63 gmtDemo: begin |
60 GameState:= gsExit; |
64 GameState:= gsExit; |
61 exit |
65 exit |
62 end; |
66 end; |
63 gmtSave: begin |
67 gmtSave: begin |
65 SetBinds(CurrentTeam^.Binds); |
69 SetBinds(CurrentTeam^.Binds); |
66 //CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos |
70 //CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos |
67 isSoundEnabled:= isSEBackup; |
71 isSoundEnabled:= isSEBackup; |
68 if isSoundEnabled then playMusic; |
72 if isSoundEnabled then playMusic; |
69 GameType:= gmtLocal; |
73 GameType:= gmtLocal; |
70 InitIPC; |
74 AddVisualGear(0, 0, vgtTeamHealthSorter); |
75 {$IFDEF IPHONEOS}InitIPC;{$ENDIF} |
|
71 perfExt_SaveFinishedSynching(); |
76 perfExt_SaveFinishedSynching(); |
72 end; |
77 end; |
73 end |
78 end |
74 else ProcessGears |
79 else ProcessGears |
75 end; |
80 end; |