321 Message:= Message or (gmHJump and InputMask); |
321 Message:= Message or (gmHJump and InputMask); |
322 ScriptCall('onHJump'); |
322 ScriptCall('onHJump'); |
323 end; |
323 end; |
324 |
324 |
325 procedure chAttack_p(var s: shortstring); |
325 procedure chAttack_p(var s: shortstring); |
|
326 var inbtwnTrgtAttks: Boolean; |
326 begin |
327 begin |
327 s:= s; // avoid compiler hint |
328 s:= s; // avoid compiler hint |
328 if CheckNoTeamOrHH then |
329 if CheckNoTeamOrHH then |
329 exit; |
330 exit; |
330 bShowFinger:= false; |
331 bShowFinger:= false; |
331 with CurrentHedgehog^.Gear^ do |
332 with CurrentHedgehog^.Gear^ do |
332 begin |
333 begin |
333 AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State)); |
334 AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State)); |
334 if ((State and gstHHDriven) <> 0) then |
335 if ((State and gstHHDriven) <> 0) then |
335 begin |
336 begin |
336 FollowGear:= CurrentHedgehog^.Gear; |
337 inbtwnTrgtAttks:= ((GameFlags and gfInfAttack) <> 0) and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0); |
|
338 if (not inbtwnTrgtAttks) then |
|
339 FollowGear:= CurrentHedgehog^.Gear; |
337 if not isExternalSource then |
340 if not isExternalSource then |
338 SendIPC(_S'A'); |
341 SendIPC(_S'A'); |
339 Message:= Message or (gmAttack and InputMask); |
342 Message:= Message or (gmAttack and InputMask); |
340 ScriptCall('onAttack'); // so if I fire airstrike, it doesn't count as attack? fine, fine |
343 ScriptCall('onAttack'); // so if I fire airstrike, it doesn't count as attack? fine, fine |
341 end |
344 end |