hedgewars/uGearsRender.pas
changeset 10807 66cde98f8cbe
parent 10800 3c71e5158519
child 10818 f642a28cab0c
--- a/hedgewars/uGearsRender.pas	Wed Jan 21 16:00:08 2015 -0500
+++ b/hedgewars/uGearsRender.pas	Sat Jan 24 13:49:57 2015 -0500
@@ -1120,9 +1120,18 @@
                        DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle)
                     else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
                     end;
-         gtAirMine: if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then
+         gtAirMine: if Gear^.State and gstTmpFlag = 0 then                // mine is inactive
+                        begin
+                        Tint(150,150,150,255);
+                        DrawSprite(sprAirMine, x-16, y-16, 15);
+                        untint
+                        end
+                    else if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then  // mine is chasing a hog
                          DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 25) mod 16)
-                    else DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 125) mod 16);
+                    else if Gear^.State and gstHHChooseTarget <> 0 then   // mine is seeking for hogs
+                         DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 125) mod 16)
+                    else
+                         DrawSprite(sprAirMine, x-16, y-16, 4);           // mine is active but not seeking
 
            gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
                            DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle)