Fix vgtAmmo showing air attack icon if frame is amNothing
authorWuzzy <almikes@aol.com>
Thu, 21 Sep 2017 03:08:25 +0200
changeset 12470 c8ee50955fae
parent 12469 39d780f9bf35
child 12471 72c17eabc497
Fix vgtAmmo showing air attack icon if frame is amNothing
hedgewars/uVisualGears.pas
--- a/hedgewars/uVisualGears.pas	Thu Sep 21 03:07:29 2017 +0200
+++ b/hedgewars/uVisualGears.pas	Thu Sep 21 03:08:25 2017 +0200
@@ -339,7 +339,8 @@
                             tinted:= true;
                             Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
                             DrawTextureF(ropeIconTex, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 32, 32);
-                            DrawTextureF(SpritesData[sprAMAmmos].Texture, Gear^.scale * 0.90, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame - 1, 1, 32, 32);
+                            if Gear^.Frame <> ord(amNothing) then
+                                DrawTextureF(SpritesData[sprAMAmmos].Texture, Gear^.scale * 0.90, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame - 1, 1, 32, 32);
                             end;
                    vgtShell: begin
                              if Gear^.FrameTicks < $FF then