use cScaleFactor where I incorrectly used the variable zoom in the past. i was young and needed the money
authorsheepluva
Tue, 10 Jun 2014 07:48:08 +0200
changeset 10264 cb4331b032f4
parent 10263 6ef900411158
child 10265 7e8d4cd76ce7
use cScaleFactor where I incorrectly used the variable zoom in the past. i was young and needed the money
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsRender.pas	Tue Jun 10 01:15:48 2014 +0200
+++ b/hedgewars/uGearsRender.pas	Tue Jun 10 07:48:08 2014 +0200
@@ -71,7 +71,7 @@
 
     glTranslatef(WorldDx, WorldDy, 0);
 
-    glLineWidth(2.0 * zoom);
+    glLineWidth(2.0 * cScaleFactor);
 
     Tint($C0, $C0, $C0, $FF);
 
@@ -963,8 +963,8 @@
                 if (cTagsMask and htHealth) <> 0 then
                     ty := ty - HealthTagTex^.h - 2;
                 tx := ox;
-                tx := round(max(((-cScreenWidth + 16) / zoom) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / zoom) - SpritesData[sprFinger].Width div 2, tx)));
-                ty := round(max(cScreenHeight div 2 - ((cScreenHeight - 16) / (zoom)) + SpritesData[sprFinger].Height div 2, min(cScreenHeight div 2 - ((-cScreenHeight + SpritesData[sprFinger].Height) / (zoom)) - SpritesData[sprFinger].Width div 2 - 96, ty)));
+                tx := round(max(((-cScreenWidth + 16) / cScaleFactor) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / cScaleFactor) - SpritesData[sprFinger].Width div 2, tx)));
+                ty := round(max(cScreenHeight div 2 - ((cScreenHeight - 16) / cScaleFactor) + SpritesData[sprFinger].Height div 2, min(cScreenHeight div 2 - ((-cScreenHeight + SpritesData[sprFinger].Height) / (cScaleFactor)) - SpritesData[sprFinger].Width div 2 - 96, ty)));
 
                 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90;