This should allow hedgehogs to still move freely after trapping other hedgehogs in a portal loop.
authornemo
Fri, 07 Oct 2011 18:52:04 -0400
changeset 6092 fd602b5838ab
parent 6091 77b826a8f996
child 6093 42c9ac754460
This should allow hedgehogs to still move freely after trapping other hedgehogs in a portal loop.
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
--- a/hedgewars/GSHandlers.inc	Fri Oct 07 17:29:00 2011 -0400
+++ b/hedgewars/GSHandlers.inc	Fri Oct 07 18:52:04 2011 -0400
@@ -4205,7 +4205,8 @@
         iterator:= GearsList;
         while iterator <> nil do
             begin
-            if iterator^.Kind <> gtPortal then
+            if (iterator^.Kind <> gtPortal) and 
+               ((iterator^.Hedgehog <> CurrentHedgehog) or ((iterator^.Message and gmAllStoppable) = 0)) then
                 begin
                 iterator^.Active:= true;
                 if iterator^.dY.QWordValue = _0.QWordValue then iterator^.dY.isNegative:= false;
--- a/hedgewars/HHHandlers.inc	Fri Oct 07 17:29:00 2011 -0400
+++ b/hedgewars/HHHandlers.inc	Fri Oct 07 18:52:04 2011 -0400
@@ -901,11 +901,13 @@
     Hedgehog: PHedgehog;
 begin
 Hedgehog:= HHGear^.Hedgehog;
-if not isInMultiShoot then
-   AllInactive:= false
-else
+if isInMultiShoot then
    HHGear^.Message:= 0;
 
+if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then 
+    AllInactive:= true
+else if not isInMultiShoot then AllInactive:= false;
+
 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
     begin
     if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;