hedgewars/GSHandlers.inc
changeset 6555 11f82e49d276
parent 6535 51a7e71ad317
child 6556 faa47a7e614a
--- a/hedgewars/GSHandlers.inc	Mon Jan 09 01:13:55 2012 -0500
+++ b/hedgewars/GSHandlers.inc	Tue Jan 10 22:41:35 2012 -0500
@@ -1413,7 +1413,7 @@
     HHGear := Gear^.Hedgehog^.Gear;
 
     if ((HHGear^.State and gstHHDriven) = 0)
-       or (CheckGearDrowning(HHGear)) then
+       or (CheckGearDrowning(HHGear)) or (Gear^.PortalCounter <> 0) then
         begin
         PlaySound(sndRopeRelease);
         RopeDeleteMe(Gear, HHGear);
@@ -3876,10 +3876,6 @@
         // don't port hogs on rope
         // TODO: this will also prevent hogs while falling after rope use from
         //       falling through portals... fix that!
-        if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil)
-           and (iterator = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.Kind =
-           gtRope) then
-            continue;
 
         // check if gear fits through portal
         if (iterator^.Radius > Gear^.Radius) then
@@ -4109,6 +4105,10 @@
             iterator^.State:= iterator^.State and (not gstHHHJump)
             end;
 
+        if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil)
+           and (iterator = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.Kind =
+           gtRope) then CurAmmoGear^.PortalCounter:= 1;
+
         if not isbullet and (iterator^.Kind <> gtFlake) then
             FollowGear := iterator;