hedgewars/uGearsRender.pas
changeset 10313 769061317dc5
parent 10312 eda8d563f677
child 10324 5d90d8ca9657
--- a/hedgewars/uGearsRender.pas	Mon Jun 16 02:23:37 2014 +0200
+++ b/hedgewars/uGearsRender.pas	Mon Jun 16 02:41:03 2014 +0200
@@ -972,7 +972,13 @@
                 t:= 32;//trunc((SpritesData[sprFinger].Height + t) / cScaleFactor);
                 ty := min(ty, ViewBottomY - 96);
                 // don't overlap with HH or HH tags
-                if ty < ViewTopY + t then ty:= max(ViewTopY + t, oy + t);
+                if ty < ViewTopY + t then
+                    begin
+                    if abs(tx - ox) < abs(ty - oy)  then
+                        ty:= max(ViewTopY + t, oy + t)
+                    else
+                        ty:= max(ViewTopY + t, ty);
+                    end;
 
                 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90;