hedgewars/uGearsHandlersRope.pas
changeset 9473 a51a69094c24
parent 9080 9b42757d7e71
child 9526 2fd51591b260
equal deleted inserted replaced
9470:9ed07a96349d 9473:a51a69094c24
    31 procedure doStepRopeAfterAttack(Gear: PGear);
    31 procedure doStepRopeAfterAttack(Gear: PGear);
    32 var 
    32 var 
    33     HHGear: PGear;
    33     HHGear: PGear;
    34 begin
    34 begin
    35     HHGear := Gear^.Hedgehog^.Gear;
    35     HHGear := Gear^.Hedgehog^.Gear;
       
    36     WorldWrap(HHGear);
    36     if (HHGear^.Hedgehog^.CurAmmoType = amParachute) and (HHGear^.dY > _0_39) then
    37     if (HHGear^.Hedgehog^.CurAmmoType = amParachute) and (HHGear^.dY > _0_39) then
    37         begin
    38         begin
    38         DeleteGear(Gear);
    39         DeleteGear(Gear);
    39         ApplyAmmoChanges(HHGear^.Hedgehog^);
    40         ApplyAmmoChanges(HHGear^.Hedgehog^);
    40         HHGear^.Message:= HHGear^.Message or gmLJump;
    41         HHGear^.Message:= HHGear^.Message or gmLJump;
   114 begin
   115 begin
   115     if GameTicks mod 4 <> 0 then exit;
   116     if GameTicks mod 4 <> 0 then exit;
   116 
   117 
   117     HHGear := Gear^.Hedgehog^.Gear;
   118     HHGear := Gear^.Hedgehog^.Gear;
   118 
   119 
   119     if ((HHGear^.State and gstHHDriven) = 0)
   120     if ((HHGear^.State and gstHHDriven) = 0) or WorldWrap(HHGear)
   120        or (CheckGearDrowning(HHGear)) or (Gear^.PortalCounter <> 0) then
   121        or (CheckGearDrowning(HHGear)) or (Gear^.PortalCounter <> 0) then
   121         begin
   122         begin
   122         PlaySound(sndRopeRelease);
   123         PlaySound(sndRopeRelease);
   123         RopeDeleteMe(Gear, HHGear);
   124         RopeDeleteMe(Gear, HHGear);
   124         exit
   125         exit