hedgewars/uGearsHandlersMess.pas
changeset 15711 4a8a1dd9528a
parent 15710 7383256f8535
child 15712 b496233ac26d
--- a/hedgewars/uGearsHandlersMess.pas	Thu Jul 09 00:22:40 2020 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Jul 09 00:32:53 2020 +0300
@@ -7295,6 +7295,12 @@
         exit;
     end;
 
+    if ((Gear^.Health * 100) < random(cSentryHealth * 90)) and ((GameTicks and $FF) = 0) then
+        if Gear^.Health * 2 < cSentryHealth then
+            AddVisualGear(hwRound(Gear^.X) - 8 + Random(16), hwRound(Gear^.Y) - 2, vgtSmoke)
+        else
+            AddVisualGear(hwRound(Gear^.X) - 8 + Random(16), hwRound(Gear^.Y) - 2, vgtSmokeWhite);
+
     if Gear^.dY.isNegative or (TestCollisionYwithGear(Gear, 1) = 0) then
     begin
         doStepFallingGear(Gear);