163 s:= s; // avoid compiler hint |
163 s:= s; // avoid compiler hint |
164 if CheckNoTeamOrHH or isPaused then exit; |
164 if CheckNoTeamOrHH or isPaused then exit; |
165 if not CurrentTeam^.ExtDriven then SendIPC('L'); |
165 if not CurrentTeam^.ExtDriven then SendIPC('L'); |
166 bShowFinger:= false; |
166 bShowFinger:= false; |
167 with CurrentHedgehog^.Gear^ do |
167 with CurrentHedgehog^.Gear^ do |
168 Message:= Message or (gmLeft and InputMask) |
168 Message:= Message or (gmLeft and InputMask); |
|
169 ScriptCall('onLeft'); |
169 end; |
170 end; |
170 |
171 |
171 procedure chLeft_m(var s: shortstring); |
172 procedure chLeft_m(var s: shortstring); |
172 begin |
173 begin |
173 s:= s; // avoid compiler hint |
174 s:= s; // avoid compiler hint |
174 if CheckNoTeamOrHH then exit; |
175 if CheckNoTeamOrHH then exit; |
175 if not CurrentTeam^.ExtDriven then SendIPC('l'); |
176 if not CurrentTeam^.ExtDriven then SendIPC('l'); |
176 with CurrentHedgehog^.Gear^ do |
177 with CurrentHedgehog^.Gear^ do |
177 Message:= Message and not (gmLeft and InputMask) |
178 Message:= Message and not (gmLeft and InputMask); |
|
179 ScriptCall('onLeftUp'); |
178 end; |
180 end; |
179 |
181 |
180 procedure chRight_p(var s: shortstring); |
182 procedure chRight_p(var s: shortstring); |
181 begin |
183 begin |
182 s:= s; // avoid compiler hint |
184 s:= s; // avoid compiler hint |
183 if CheckNoTeamOrHH or isPaused then exit; |
185 if CheckNoTeamOrHH or isPaused then exit; |
184 if not CurrentTeam^.ExtDriven then SendIPC('R'); |
186 if not CurrentTeam^.ExtDriven then SendIPC('R'); |
185 bShowFinger:= false; |
187 bShowFinger:= false; |
186 with CurrentHedgehog^.Gear^ do |
188 with CurrentHedgehog^.Gear^ do |
187 Message:= Message or (gmRight and InputMask) |
189 Message:= Message or (gmRight and InputMask); |
|
190 ScriptCall('onRight'); |
188 end; |
191 end; |
189 |
192 |
190 procedure chRight_m(var s: shortstring); |
193 procedure chRight_m(var s: shortstring); |
191 begin |
194 begin |
192 s:= s; // avoid compiler hint |
195 s:= s; // avoid compiler hint |
193 if CheckNoTeamOrHH then exit; |
196 if CheckNoTeamOrHH then exit; |
194 if not CurrentTeam^.ExtDriven then SendIPC('r'); |
197 if not CurrentTeam^.ExtDriven then SendIPC('r'); |
195 with CurrentHedgehog^.Gear^ do |
198 with CurrentHedgehog^.Gear^ do |
196 Message:= Message and not (gmRight and InputMask) |
199 Message:= Message and not (gmRight and InputMask); |
|
200 ScriptCall('onRightUp'); |
197 end; |
201 end; |
198 |
202 |
199 procedure chUp_p(var s: shortstring); |
203 procedure chUp_p(var s: shortstring); |
200 begin |
204 begin |
201 s:= s; // avoid compiler hint |
205 s:= s; // avoid compiler hint |
202 if CheckNoTeamOrHH or isPaused then exit; |
206 if CheckNoTeamOrHH or isPaused then exit; |
203 if not CurrentTeam^.ExtDriven then SendIPC('U'); |
207 if not CurrentTeam^.ExtDriven then SendIPC('U'); |
204 bShowFinger:= false; |
208 bShowFinger:= false; |
205 with CurrentHedgehog^.Gear^ do |
209 with CurrentHedgehog^.Gear^ do |
206 Message:= Message or (gmUp and InputMask) |
210 Message:= Message or (gmUp and InputMask); |
|
211 ScriptCall('onUp'); |
207 end; |
212 end; |
208 |
213 |
209 procedure chUp_m(var s: shortstring); |
214 procedure chUp_m(var s: shortstring); |
210 begin |
215 begin |
211 s:= s; // avoid compiler hint |
216 s:= s; // avoid compiler hint |
212 if CheckNoTeamOrHH then exit; |
217 if CheckNoTeamOrHH then exit; |
213 if not CurrentTeam^.ExtDriven then SendIPC('u'); |
218 if not CurrentTeam^.ExtDriven then SendIPC('u'); |
214 with CurrentHedgehog^.Gear^ do |
219 with CurrentHedgehog^.Gear^ do |
215 Message:= Message and not (gmUp and InputMask); |
220 Message:= Message and not (gmUp and InputMask); |
|
221 ScriptCall('onUpUp'); |
216 end; |
222 end; |
217 |
223 |
218 procedure chDown_p(var s: shortstring); |
224 procedure chDown_p(var s: shortstring); |
219 begin |
225 begin |
220 s:= s; // avoid compiler hint |
226 s:= s; // avoid compiler hint |
221 if CheckNoTeamOrHH or isPaused then exit; |
227 if CheckNoTeamOrHH or isPaused then exit; |
222 if not CurrentTeam^.ExtDriven then SendIPC('D'); |
228 if not CurrentTeam^.ExtDriven then SendIPC('D'); |
223 bShowFinger:= false; |
229 bShowFinger:= false; |
224 with CurrentHedgehog^.Gear^ do |
230 with CurrentHedgehog^.Gear^ do |
225 Message:= Message or (gmDown and InputMask) |
231 Message:= Message or (gmDown and InputMask); |
|
232 ScriptCall('onDown'); |
226 end; |
233 end; |
227 |
234 |
228 procedure chDown_m(var s: shortstring); |
235 procedure chDown_m(var s: shortstring); |
229 begin |
236 begin |
230 s:= s; // avoid compiler hint |
237 s:= s; // avoid compiler hint |
231 if CheckNoTeamOrHH then exit; |
238 if CheckNoTeamOrHH then exit; |
232 if not CurrentTeam^.ExtDriven then SendIPC('d'); |
239 if not CurrentTeam^.ExtDriven then SendIPC('d'); |
233 with CurrentHedgehog^.Gear^ do |
240 with CurrentHedgehog^.Gear^ do |
234 Message:= Message and not (gmDown and InputMask) |
241 Message:= Message and not (gmDown and InputMask); |
|
242 ScriptCall('onDownUp'); |
235 end; |
243 end; |
236 |
244 |
237 procedure chPrecise_p(var s: shortstring); |
245 procedure chPrecise_p(var s: shortstring); |
238 begin |
246 begin |
239 s:= s; // avoid compiler hint |
247 s:= s; // avoid compiler hint |
240 if CheckNoTeamOrHH or isPaused then exit; |
248 if CheckNoTeamOrHH or isPaused then exit; |
241 if not CurrentTeam^.ExtDriven then SendIPC('Z'); |
249 if not CurrentTeam^.ExtDriven then SendIPC('Z'); |
242 bShowFinger:= false; |
250 bShowFinger:= false; |
243 with CurrentHedgehog^.Gear^ do |
251 with CurrentHedgehog^.Gear^ do |
244 Message:= Message or (gmPrecise and InputMask); |
252 Message:= Message or (gmPrecise and InputMask); |
|
253 ScriptCall('onPrecise'); |
245 end; |
254 end; |
246 |
255 |
247 procedure chPrecise_m(var s: shortstring); |
256 procedure chPrecise_m(var s: shortstring); |
248 begin |
257 begin |
249 s:= s; // avoid compiler hint |
258 s:= s; // avoid compiler hint |
250 if CheckNoTeamOrHH then exit; |
259 if CheckNoTeamOrHH then exit; |
251 if not CurrentTeam^.ExtDriven then SendIPC('z'); |
260 if not CurrentTeam^.ExtDriven then SendIPC('z'); |
252 with CurrentHedgehog^.Gear^ do |
261 with CurrentHedgehog^.Gear^ do |
253 Message:= Message and not (gmPrecise and InputMask); |
262 Message:= Message and not (gmPrecise and InputMask); |
|
263 ScriptCall('onPreciseUp'); |
254 end; |
264 end; |
255 |
265 |
256 procedure chLJump(var s: shortstring); |
266 procedure chLJump(var s: shortstring); |
257 begin |
267 begin |
258 s:= s; // avoid compiler hint |
268 s:= s; // avoid compiler hint |
259 if CheckNoTeamOrHH or isPaused then exit; |
269 if CheckNoTeamOrHH or isPaused then exit; |
260 if not CurrentTeam^.ExtDriven then SendIPC('j'); |
270 if not CurrentTeam^.ExtDriven then SendIPC('j'); |
261 bShowFinger:= false; |
271 bShowFinger:= false; |
262 with CurrentHedgehog^.Gear^ do |
272 with CurrentHedgehog^.Gear^ do |
263 Message:= Message or (gmLJump and InputMask) |
273 Message:= Message or (gmLJump and InputMask); |
|
274 ScriptCall('onLJump'); |
264 end; |
275 end; |
265 |
276 |
266 procedure chHJump(var s: shortstring); |
277 procedure chHJump(var s: shortstring); |
267 begin |
278 begin |
268 s:= s; // avoid compiler hint |
279 s:= s; // avoid compiler hint |
269 if CheckNoTeamOrHH or isPaused then exit; |
280 if CheckNoTeamOrHH or isPaused then exit; |
270 if not CurrentTeam^.ExtDriven then SendIPC('J'); |
281 if not CurrentTeam^.ExtDriven then SendIPC('J'); |
271 bShowFinger:= false; |
282 bShowFinger:= false; |
272 with CurrentHedgehog^.Gear^ do |
283 with CurrentHedgehog^.Gear^ do |
273 Message:= Message or (gmHJump and InputMask) |
284 Message:= Message or (gmHJump and InputMask); |
|
285 ScriptCall('onHJump'); |
274 end; |
286 end; |
275 |
287 |
276 procedure chAttack_p(var s: shortstring); |
288 procedure chAttack_p(var s: shortstring); |
277 begin |
289 begin |
278 s:= s; // avoid compiler hint |
290 s:= s; // avoid compiler hint |