# HG changeset patch # User alfadur # Date 1594243973 -10800 # Node ID 4a8a1dd9528a51bc0a12c49acb721598f76fb937 # Parent 7383256f8535a8d59521f2b6e1707d08270df5b5 add smoking to damaged sentries diff -r 7383256f8535 -r 4a8a1dd9528a hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Thu Jul 09 00:22:40 2020 +0300 +++ b/hedgewars/uConsts.pas Thu Jul 09 00:32:53 2020 +0300 @@ -211,6 +211,7 @@ // some gear constants cBarrelHealth = 60; // initial barrel health + cSentryHealth = 60; // initial sentry health cShotgunRadius = 22; // radius of land a shotgun shot destroys cBlowTorchC = 6; // blow torch gear radius component (added to cHHRadius to get the full radius) cakeDmg = 75; // default cake damage diff -r 7383256f8535 -r 4a8a1dd9528a hedgewars/uGearsHandlersMess.pas --- 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); diff -r 7383256f8535 -r 4a8a1dd9528a hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Thu Jul 09 00:22:40 2020 +0300 +++ b/hedgewars/uGearsList.pas Thu Jul 09 00:32:53 2020 +0300 @@ -838,7 +838,7 @@ end; gtSentry: begin gear^.Radius:= cHHRadius; - gear^.Health:= 60; + gear^.Health:= cSentryHealth; gear^.Friction:= _0_93; gear^.Elasticity:= _0_05; gear^.Tag:= 0;