hedgewars/uGearsHandlersMess.pas
changeset 14205 1bdce164eb72
parent 14202 3e551b0535fb
child 14206 abf4d12a59b1
--- a/hedgewars/uGearsHandlersMess.pas	Mon Nov 12 20:30:06 2018 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Tue Nov 13 01:56:42 2018 +0300
@@ -2090,6 +2090,16 @@
     if (TurnTimeLeft = 0) and ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then
         AllInactive := false;
 
+    //Disable targeting while the airmine is stunned
+    if Gear^.Tag <> 0 then
+        begin
+        Gear^.Hedgehog:= nil;
+        dec(Gear^.FlightTime);
+        if Gear^.FlightTime = 0 then
+            Gear^.Tag:= 0;
+        exit
+        end;
+
     if (TurnTimeLeft = 0) or (Gear^.Angle = 0) or (Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.Gear = nil) then
         begin
         Gear^.Hedgehog:= nil;