Use "looky" hog sprite for missing hat texture as well
authorWuzzy <Wuzzy2@mail.ru>
Fri, 24 May 2019 21:47:20 +0200
changeset 15063 586ebee9de41
parent 15062 f764394839b2
child 15064 35932896ce84
Use "looky" hog sprite for missing hat texture as well
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsRender.pas	Fri May 24 21:23:36 2019 +0200
+++ b/hedgewars/uGearsRender.pas	Fri May 24 21:47:20 2019 +0200
@@ -931,8 +931,8 @@
                     end
             else
                 // Special hog sprite that makes hog "look" towards the selection icon.
-                // Only works with NoHat for now since it would look weird/creepy for many hats.
-                if (HH^.Hat = 'NoHat') and ((Gear^.State and (gstMoving or gstAttacking)) = 0) and ((Ammoz[amt].Ammo.Propz and ammoprop_ShowSelIcon) <> 0) then
+                // Only works without hat for now since it would look weird/creepy for many hats.
+                if ((HH^.Hat = 'NoHat') or (HH^.HatTex = nil)) and ((Gear^.State and (gstMoving or gstAttacking)) = 0) and ((Ammoz[amt].Ammo.Propz and ammoprop_ShowSelIcon) <> 0) then
                     DrawHedgehog(sx, sy,
                         sign,
                         0,