hedgewars/uGearsRender.pas
changeset 13233 bb73d6d3348a
parent 13214 9c81e34f1933
child 13282 b13071610c07
--- a/hedgewars/uGearsRender.pas	Sat Mar 17 02:16:16 2018 +0100
+++ b/hedgewars/uGearsRender.pas	Sat Mar 17 04:02:37 2018 +0100
@@ -490,10 +490,14 @@
                                 begin
                                 DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
                                     i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
-                                if curhat^.w > 64 then
+                                if (curhat^.w > 64) or ((curhat^.w = 64) and (curhat^.h = 32)) then
                                     begin
+                                    if ((curhat^.w = 64) and (curhat^.h = 32)) then
+                                        tx := 1
+                                    else
+                                        tx := 32;
                                     Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
-                                    DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32,
+                                    DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, tx, i, 32, 32,
                                         i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
                                     untint
                                     end
@@ -521,14 +525,18 @@
                                 sign,
                                 32,
                                 32);
-                            if curhat^.w > 64 then
+                            if (curhat^.w > 64) or ((curhat^.w = 64) and (curhat^.h = 32)) then
                                 begin
+                                if ((curhat^.w = 64) and (curhat^.h = 32)) then
+                                    tx := 1
+                                else
+                                    tx := 32;
                                 Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
                                 DrawTextureF(curhat,
                                     1,
                                     sx,
                                     sy - 5,
-                                    32,
+                                    tx,
                                     sign,
                                     32,
                                     32);