equal
deleted
inserted
replaced
681 |
681 |
682 if (Gear^.Message and gm_Attack) <> 0 then |
682 if (Gear^.Message and gm_Attack) <> 0 then |
683 begin |
683 begin |
684 Gear^.X:= HHGear^.X; |
684 Gear^.X:= HHGear^.X; |
685 Gear^.Y:= HHGear^.Y; |
685 Gear^.Y:= HHGear^.Y; |
|
686 |
|
687 ApplyAngleBounds(PHedgehog(Gear^.Hedgehog)^, amRope); |
|
688 |
686 Gear^.dX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX); |
689 Gear^.dX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX); |
687 Gear^.dY:= -AngleCos(HHGear^.Angle); |
690 Gear^.dY:= -AngleCos(HHGear^.Angle); |
688 Gear^.Friction:= _450; |
691 Gear^.Friction:= _450; |
689 Gear^.Elasticity:= _0; |
692 Gear^.Elasticity:= _0; |
690 Gear^.State:= Gear^.State and not gsttmpflag; |
693 Gear^.State:= Gear^.State and not gsttmpflag; |
848 end; |
851 end; |
849 |
852 |
850 if (Gear^.Message and gm_Attack) <> 0 then |
853 if (Gear^.Message and gm_Attack) <> 0 then |
851 if (Gear^.State and gsttmpFlag) <> 0 then |
854 if (Gear^.State and gsttmpFlag) <> 0 then |
852 with PHedgehog(Gear^.Hedgehog)^ do |
855 with PHedgehog(Gear^.Hedgehog)^ do |
853 if Ammo^[CurSlot, CurAmmo].AmmoType = amRope then |
856 if Ammo^[CurSlot, CurAmmo].AmmoType <> amParachute then |
854 WaitCollision |
857 WaitCollision |
855 else |
858 else |
856 DeleteMe |
859 DeleteMe |
857 else |
860 else |
858 else |
861 else |
867 procedure RemoveFromAmmo; |
870 procedure RemoveFromAmmo; |
868 begin |
871 begin |
869 if (Gear^.State and gstAttacked) = 0 then |
872 if (Gear^.State and gstAttacked) = 0 then |
870 begin |
873 begin |
871 OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^); |
874 OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^); |
872 ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^); |
|
873 Gear^.State:= Gear^.State or gstAttacked |
875 Gear^.State:= Gear^.State or gstAttacked |
874 end |
876 end; |
|
877 ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^) |
875 end; |
878 end; |
876 |
879 |
877 begin |
880 begin |
878 Gear^.X:= Gear^.X - Gear^.dX; |
881 Gear^.X:= Gear^.X - Gear^.dX; |
879 Gear^.Y:= Gear^.Y - Gear^.dY; |
882 Gear^.Y:= Gear^.Y - Gear^.dY; |