Make mine active/hunting glow a bit more obvious. Add frozen sprite, increase ice beam mine "hit" radius a bit
authornemo
Sat, 26 May 2018 10:54:17 -0400
changeset 13404 8ce83caec236
parent 13403 9c9d29be9e00
child 13405 4c813650fe17
Make mine active/hunting glow a bit more obvious. Add frozen sprite, increase ice beam mine "hit" radius a bit
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsRender.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Graphics/AirMine.png
share/hedgewars/Data/Graphics/FrozenAirMine.png
--- a/hedgewars/uGearsHandlersMess.pas	Thu May 24 13:04:56 2018 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Sat May 26 10:54:17 2018 -0400
@@ -6156,7 +6156,7 @@
         if (ndX <> dX) or (ndY <> dY) or
            (((Target.X <> NoPointX) and (Target.X and LAND_WIDTH_MASK = 0) and
              (Target.Y and LAND_HEIGHT_MASK = 0) and ((Land[Target.Y, Target.X] = 0)) and
-             (not CheckCoordInWater(Target.X, Target.Y))) and (CheckGearNear(gtAirMine, int2hwFloat(Target.X),int2hwFloat(Target.Y), Gear^.Radius*2, Gear^.Radius*2) = nil)) then
+             (not CheckCoordInWater(Target.X, Target.Y))) and (CheckGearNear(gtAirMine, int2hwFloat(Target.X),int2hwFloat(Target.Y), Gear^.Radius*3, Gear^.Radius*3) = nil)) then
             begin
             updateTarget(Gear, ndX, ndY);
             Timer := iceWaitCollision;
@@ -6172,7 +6172,7 @@
             if Target.X <> NoPointX then
                 begin
                 CheckCollision(Gear);
-                if ((State and gstCollision) <> 0) or (CheckGearNear(gtAirMine, int2hwFloat(Target.X),int2hwFloat(Target.Y), Gear^.Radius*3, Gear^.Radius*3) <> nil) then
+                if ((State and gstCollision) <> 0) or (CheckGearNear(gtAirMine, int2hwFloat(Target.X),int2hwFloat(Target.Y), Gear^.Radius*4, Gear^.Radius*4) <> nil) then
                     begin
                     if Timer = iceWaitCollision then
                         begin
--- a/hedgewars/uGearsRender.pas	Thu May 24 13:04:56 2018 -0400
+++ b/hedgewars/uGearsRender.pas	Sat May 26 10:54:17 2018 -0400
@@ -1207,7 +1207,8 @@
     aAngle: real;
     startX, endX, startY, endY: LongInt;
 begin
-    if Gear^.State and gstFrozen <> 0 then Tint($A0, $A0, $FF, $FF);
+	// airmine has its own sprite
+    if (Gear^.State and gstFrozen <> 0) and (Gear^.Kind <> gtAirMine) then Tint($A0, $A0, $FF, $FF);
     //if Gear^.State and gstFrozen <> 0 then Tint(IceColor or $FF);
     if Gear^.Target.X <> NoPointX then
         if Gear^.AmmoType = amBee then
@@ -1289,7 +1290,10 @@
                        DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle)
                     else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
                     end;
-         gtAirMine: if (Gear^.State and gstTmpFlag = 0) or (Gear^.State and gstFrozen <> 0) then                // mine is inactive
+         gtAirMine: 
+					if (Gear^.State and gstFrozen <> 0) then 
+                        DrawSprite(sprFrozenAirMine, x-16, y-16, 15)
+					else if (Gear^.State and gstTmpFlag = 0) then                // mine is inactive
                         begin
 						if (Gear^.State and gstTmpFlag = 0) then Tint(150,150,150,255);
                         DrawSprite(sprAirMine, x-16, y-16, 15);
--- a/hedgewars/uTypes.pas	Thu May 24 13:04:56 2018 -0400
+++ b/hedgewars/uTypes.pas	Sat May 26 10:54:17 2018 -0400
@@ -90,7 +90,7 @@
             sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
             sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun,
             sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2, sprCustom3, sprCustom4,
-            sprCustom5, sprCustom6, sprCustom7, sprCustom8, sprAirMine, sprHandAirMine,
+            sprCustom5, sprCustom6, sprCustom7, sprCustom8, sprFrozenAirMine, sprAirMine, sprHandAirMine,
             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprDuck, sprHandDuck, sprMinigun
             );
 
--- a/hedgewars/uVariables.pas	Thu May 24 13:04:56 2018 -0400
+++ b/hedgewars/uVariables.pas	Sat May 26 10:54:17 2018 -0400
@@ -761,6 +761,8 @@
             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: true; critical: true; checkSum: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom7
             (FileName:       'custom8'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
             Width:   0; Height:  0; imageWidth: 0; imageHeight: 0; saveSurf: true; critical: true; checkSum: true; priority: tpLow; getDimensions: true; getImageDimensions: true), // sprCustom8
+            (FileName:      'FrozenAirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+            Width:  32; Height: 32; imageWidth: 32; imageHeight: 32; saveSurf: false; critical: true; checkSum: false; priority: tpHighest; getDimensions: false; getImageDimensions: true), // sprFrozenAirMine
             (FileName:      'AirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpHighest; getDimensions: false; getImageDimensions: true), // sprAirMine
             (FileName:  'amAirMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
Binary file share/hedgewars/Data/Graphics/AirMine.png has changed
Binary file share/hedgewars/Data/Graphics/FrozenAirMine.png has changed