138 end; |
138 end; |
139 |
139 |
140 procedure chLeft_p(var s: shortstring); |
140 procedure chLeft_p(var s: shortstring); |
141 begin |
141 begin |
142 if CheckNoTeamOrHH then exit; |
142 if CheckNoTeamOrHH then exit; |
|
143 bShowFinger:= false; |
143 if not CurrentTeam.ExtDriven then SendIPC('L'); |
144 if not CurrentTeam.ExtDriven then SendIPC('L'); |
144 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
145 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
145 Message:= Message or gm_Left |
146 Message:= Message or gm_Left |
146 end; |
147 end; |
147 |
148 |
154 end; |
155 end; |
155 |
156 |
156 procedure chRight_p(var s: shortstring); |
157 procedure chRight_p(var s: shortstring); |
157 begin |
158 begin |
158 if CheckNoTeamOrHH then exit; |
159 if CheckNoTeamOrHH then exit; |
|
160 bShowFinger:= false; |
159 if not CurrentTeam.ExtDriven then SendIPC('R'); |
161 if not CurrentTeam.ExtDriven then SendIPC('R'); |
160 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
162 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
161 Message:= Message or gm_Right |
163 Message:= Message or gm_Right |
162 end; |
164 end; |
163 |
165 |
170 end; |
172 end; |
171 |
173 |
172 procedure chUp_p(var s: shortstring); |
174 procedure chUp_p(var s: shortstring); |
173 begin |
175 begin |
174 if CheckNoTeamOrHH then exit; |
176 if CheckNoTeamOrHH then exit; |
|
177 bShowFinger:= false; |
175 if not CurrentTeam.ExtDriven then SendIPC('U'); |
178 if not CurrentTeam.ExtDriven then SendIPC('U'); |
176 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
179 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
177 Message:= Message or gm_Up |
180 Message:= Message or gm_Up |
178 end; |
181 end; |
179 |
182 |
186 end; |
189 end; |
187 |
190 |
188 procedure chDown_p(var s: shortstring); |
191 procedure chDown_p(var s: shortstring); |
189 begin |
192 begin |
190 if CheckNoTeamOrHH then exit; |
193 if CheckNoTeamOrHH then exit; |
|
194 bShowFinger:= false; |
191 if not CurrentTeam.ExtDriven then SendIPC('D'); |
195 if not CurrentTeam.ExtDriven then SendIPC('D'); |
192 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
196 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
193 Message:= Message or gm_Down |
197 Message:= Message or gm_Down |
194 end; |
198 end; |
195 |
199 |
202 end; |
206 end; |
203 |
207 |
204 procedure chLJump(var s: shortstring); |
208 procedure chLJump(var s: shortstring); |
205 begin |
209 begin |
206 if CheckNoTeamOrHH then exit; |
210 if CheckNoTeamOrHH then exit; |
|
211 bShowFinger:= false; |
207 if not CurrentTeam.ExtDriven then SendIPC('j'); |
212 if not CurrentTeam.ExtDriven then SendIPC('j'); |
208 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
213 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
209 Message:= Message or gm_LJump |
214 Message:= Message or gm_LJump |
210 end; |
215 end; |
211 |
216 |
212 procedure chHJump(var s: shortstring); |
217 procedure chHJump(var s: shortstring); |
213 begin |
218 begin |
214 if CheckNoTeamOrHH then exit; |
219 if CheckNoTeamOrHH then exit; |
|
220 bShowFinger:= false; |
215 if not CurrentTeam.ExtDriven then SendIPC('J'); |
221 if not CurrentTeam.ExtDriven then SendIPC('J'); |
216 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
222 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
217 Message:= Message or gm_HJump |
223 Message:= Message or gm_HJump |
218 end; |
224 end; |
219 |
225 |
220 procedure chAttack_p(var s: shortstring); |
226 procedure chAttack_p(var s: shortstring); |
221 begin |
227 begin |
222 if CheckNoTeamOrHH then exit; |
228 if CheckNoTeamOrHH then exit; |
|
229 bShowFinger:= false; |
223 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
230 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear^ do |
224 begin |
231 begin |
225 {$IFDEF DEBUGFILE}AddFileLog('/+attack: Gear.State = '+inttostr(State));{$ENDIF} |
232 {$IFDEF DEBUGFILE}AddFileLog('/+attack: Gear.State = '+inttostr(State));{$ENDIF} |
226 if ((State and gstHHDriven)<>0)and((State and (gstAttacked or gstHHChooseTarget or gstMoving)) = 0) then |
233 if ((State and gstHHDriven)<>0)and((State and (gstAttacked or gstHHChooseTarget or gstMoving)) = 0) then |
227 begin |
234 begin |
268 end; |
275 end; |
269 |
276 |
270 procedure chTimer(var s: shortstring); |
277 procedure chTimer(var s: shortstring); |
271 begin |
278 begin |
272 if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or (CurrentTeam = nil) then exit; |
279 if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or (CurrentTeam = nil) then exit; |
|
280 bShowFinger:= false; |
273 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do |
281 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do |
274 if (Ammo[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0 then |
282 if (Ammo[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0 then |
275 begin |
283 begin |
276 Ammo[CurSlot, CurAmmo].Timer:= 1000 * (byte(s[1]) - 48); |
284 Ammo[CurSlot, CurAmmo].Timer:= 1000 * (byte(s[1]) - 48); |
277 with CurrentTeam^ do |
285 with CurrentTeam^ do |
283 procedure chSlot(var s: shortstring); |
291 procedure chSlot(var s: shortstring); |
284 var slot: LongWord; |
292 var slot: LongWord; |
285 caSlot, caAmmo: PLongword; |
293 caSlot, caAmmo: PLongword; |
286 begin |
294 begin |
287 if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
295 if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
296 bShowFinger:= false; |
288 slot:= byte(s[1]) - 49; |
297 slot:= byte(s[1]) - 49; |
289 if slot > cMaxSlotIndex then exit; |
298 if slot > cMaxSlotIndex then exit; |
290 if not CurrentTeam.ExtDriven then SendIPC(char(byte(s[1]) + 79)); |
299 if not CurrentTeam.ExtDriven then SendIPC(char(byte(s[1]) + 79)); |
291 with CurrentTeam^ do |
300 with CurrentTeam^ do |
292 begin |
301 begin |