Fix dynamite sparks appearing underwater
authorWuzzy <almikes@aol.com>
Mon, 10 Apr 2017 14:34:32 +0200
changeset 12211 00bcaa0e0ef6
parent 12210 442bab755bb4
child 12212 ea891871f481
Fix dynamite sparks appearing underwater
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsRender.pas	Mon Apr 10 14:15:00 2017 +0200
+++ b/hedgewars/uGearsRender.pas	Mon Apr 10 14:34:32 2017 +0200
@@ -1327,7 +1327,7 @@
                     end;
         gtDynamite: begin
                     DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
-                    if (random(3) = 0) then
+                    if (random(3) = 0) and ((Gear^.State and gstDrowning) = 0) then
                         begin
                         vg:= AddVisualGear(hwRound(Gear^.X)+12-(Gear^.Tag shr 1), hwRound(Gear^.Y)-16, vgtStraightShot);
                         if vg <> nil then