Fix sticky mine/mine activation bug
authornemo
Wed, 19 Oct 2011 21:53:39 -0400
changeset 6155 930c3be58e1e
parent 6154 72c6239a7cc6
child 6156 baf30b1a7a75
Fix sticky mine/mine activation bug
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed Oct 19 21:50:03 2011 -0400
+++ b/hedgewars/GSHandlers.inc	Wed Oct 19 21:53:39 2011 -0400
@@ -1930,7 +1930,7 @@
             dec(Gear^.Timer);
             end
     else // gsttmpFlag = 0
-        if (TurnTimeLeft = 0) or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime)) then Gear^.State := Gear^.State or gsttmpFlag;
+        if (TurnTimeLeft = 0) or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime)) or (Gear^.Hedgehog^.Gear = nil) then Gear^.State := Gear^.State or gsttmpFlag;
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1977,8 +1977,7 @@
         end
     end
     else // gsttmpFlag = 0
-        if (TurnTimeLeft = 0) or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime)) then
-            Gear^.State := Gear^.State or gsttmpFlag;
+        if (TurnTimeLeft = 0) or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime)) or (Gear^.Hedgehog^.Gear = nil) then Gear^.State := Gear^.State or gsttmpFlag;
 end;
 
 ////////////////////////////////////////////////////////////////////////////////