hedgewars/uGearsHandlersMess.pas
changeset 12094 4dfc95eabee1
parent 11918 9da78300c5d0
child 12119 3374e0f67f39
--- a/hedgewars/uGearsHandlersMess.pas	Sun Nov 27 06:32:00 2016 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Nov 27 12:58:41 2016 +0100
@@ -1752,6 +1752,14 @@
         else // gstAttacking <> 0
             begin
             AllInactive := false;
+            // tag of 1 means this mine has a random timer
+            if (Gear^.Tag = 1) and (Gear^.Timer = 0) then
+                begin
+                if (GameTicks mod 2 = 0) then GetRandom(2);
+                if (GameTicks mod 3 = 0) then GetRandom(2);
+                Gear^.Timer:= GetRandom(51) * 100;
+                Gear^.Tag:= 0;
+                end;
             if (Gear^.Timer and $FF) = 0 then
                 PlaySound(sndMineTick);
             if Gear^.Timer = 0 then