Add flame-less dynamite sprite for drowning dynamite
authorWuzzy <Wuzzy2@mail.ru>
Fri, 11 Oct 2019 18:41:56 +0200
changeset 15465 a18f7e4681b8
parent 15464 25a5a0f86928
child 15466 c788c38f238d
Add flame-less dynamite sprite for drowning dynamite
hedgewars/uGearsRender.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Graphics/dynamiteDefused.png
--- a/hedgewars/uGearsRender.pas	Fri Oct 11 16:56:02 2019 +0200
+++ b/hedgewars/uGearsRender.pas	Fri Oct 11 18:41:56 2019 +0200
@@ -1510,7 +1510,10 @@
                         DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle)
                     end;
         gtDynamite: begin
-                    DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
+                    if ((Gear^.State and gstDrowning) = 0) then
+                        DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1)
+                    else
+                        DrawSprite(sprDynamiteDefused, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
                     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);
--- a/hedgewars/uTypes.pas	Fri Oct 11 16:56:02 2019 +0200
+++ b/hedgewars/uTypes.pas	Fri Oct 11 18:41:56 2019 +0200
@@ -94,8 +94,8 @@
             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprCreeper, sprHandCreeper, sprMinigun,
             sprSliderInverted, sprFingerBack, sprFingerBackInv, sprTargetPBack, sprTargetPBackInv,
             sprHealthHud, sprHealthPoisonHud, sprVampHud, sprKarmaHud, sprMedicHud, sprMedicPoisonHud,
-            sprHaloHud, sprInvulnHUD, sprAmPiano, sprHandLandGun, sprFirePunch, sprThroughWrap
-            );
+            sprHaloHud, sprInvulnHUD, sprAmPiano, sprHandLandGun, sprFirePunch, sprThroughWrap,
+            sprDynamiteDefused);
 
     // Gears that interact with other Gears and/or Land
     // first row of gears (<gtExplosives) should be avoided when searching a spawn place
--- a/hedgewars/uVariables.pas	Fri Oct 11 16:56:02 2019 +0200
+++ b/hedgewars/uVariables.pas	Fri Oct 11 18:41:56 2019 +0200
@@ -852,7 +852,10 @@
             (FileName: 'amShoryuken'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprFirePunch
             (FileName: 'throughWrap'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
-            Width:  16; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprTroughWrap
+            Width:  16; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTroughWrap
+            (FileName: 'dynamiteDefused'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+            Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprDynamiteDefused
+
             );
 
 
Binary file share/hedgewars/Data/Graphics/dynamiteDefused.png has changed