Fix minigun not pausing the turn timer properly
authoralfadur
Sat, 10 Mar 2018 00:54:00 +0100
changeset 13152 34ca90c2ffad
parent 13151 deab88f1f6f7
child 13153 2a53b598c1ae
Fix minigun not pausing the turn timer properly
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Fri Mar 09 23:34:46 2018 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Mar 10 00:54:00 2018 +0100
@@ -1130,11 +1130,18 @@
 procedure doStepShotIdle(Gear: PGear);
 begin
     AllInactive := false;
-    inc(Gear^.Timer);
-    if Gear^.Timer > 75 then
+    if (Gear^.Kind <> gtMinigunBullet) then
+        begin
+        inc(Gear^.Timer);
+        if Gear^.Timer > 75 then
+            begin
+            DeleteGear(Gear);
+            AfterAttack
+            end
+        end
+    else
         begin
         DeleteGear(Gear);
-        AfterAttack
         end
 end;