equal
deleted
inserted
replaced
57 t:= cMaxSlotAmmoIndex; |
57 t:= cMaxSlotAmmoIndex; |
58 |
58 |
59 Gear^.Message:= Gear^.Message and not gm_Weapon; |
59 Gear^.Message:= Gear^.Message and not gm_Weapon; |
60 |
60 |
61 with PHedgehog(Gear^.Hedgehog)^ do |
61 with PHedgehog(Gear^.Hedgehog)^ do |
62 while (Ammo^[CurSlot, CurAmmo].AmmoType <> weap) and (t >= 0) do |
62 while (Ammo^[CurSlot, CurAmmo].AmmoType <> weap) and (t >= 0) do |
63 begin |
63 begin |
64 ChangeAmmo(Gear); |
64 ChangeAmmo(Gear); |
65 dec(t) |
65 dec(t) |
66 end |
66 end |
67 end; |
67 end; |
|
68 |
|
69 procedure HHSetTimer(Gear: PGear); |
|
70 begin |
|
71 Gear^.Message:= Gear^.Message and not gm_Timer; |
|
72 with PHedgehog(Gear^.Hedgehog)^ do |
|
73 if (Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0 then |
|
74 begin |
|
75 Ammo^[CurSlot, CurAmmo].Timer:= 1000 * Gear^.MsgParam; |
|
76 with CurrentTeam^ do |
|
77 ApplyAmmoChanges(Hedgehogs[CurrHedgehog]); |
|
78 end; |
|
79 end; |
|
80 |
68 |
81 |
69 procedure Attack(Gear: PGear); |
82 procedure Attack(Gear: PGear); |
70 var xx, yy: hwFloat; |
83 var xx, yy: hwFloat; |
71 begin |
84 begin |
72 with Gear^, |
85 with Gear^, |
465 |
478 |
466 if ((Gear^.Message and gm_Slot) <> 0) then ChangeAmmo(Gear); |
479 if ((Gear^.Message and gm_Slot) <> 0) then ChangeAmmo(Gear); |
467 |
480 |
468 if ((Gear^.Message and gm_Weapon) <> 0) then HHSetWeapon(Gear); |
481 if ((Gear^.Message and gm_Weapon) <> 0) then HHSetWeapon(Gear); |
469 |
482 |
|
483 if ((Gear^.Message and gm_Timer) <> 0) then HHSetTimer(Gear); |
|
484 |
470 if ((Gear^.Message and gm_Attack) <> 0) or |
485 if ((Gear^.Message and gm_Attack) <> 0) or |
471 ((Gear^.State and gstAttacking) <> 0) then Attack(Gear); |
486 ((Gear^.State and gstAttacking) <> 0) then Attack(Gear); |
472 |
487 |
473 if (Gear^.State and gstMoving) <> 0 then |
488 if (Gear^.State and gstMoving) <> 0 then |
474 begin |
489 begin |