Move resurrector and seduction distance to uConsts
authorWuzzy <Wuzzy2@mail.ru>
Sun, 02 Jun 2019 17:34:47 +0200
changeset 15096 eff1a080cf40
parent 15095 e13b9054316b
child 15097 260e96addf92
Move resurrector and seduction distance to uConsts
hedgewars/uConsts.pas
hedgewars/uGearsList.pas
hedgewars/uGearsRender.pas
--- a/hedgewars/uConsts.pas	Sun Jun 02 17:19:07 2019 +0200
+++ b/hedgewars/uConsts.pas	Sun Jun 02 17:34:47 2019 +0200
@@ -214,6 +214,8 @@
     cFontPadding = 2 * HDPIScaleFactor;
 
     cDefaultBuildMaxDist = 256; // default max. building distance with girder/rubber
+    cResurrectorDist = 100; // effect distance of resurrector
+    cSeductionDist = 250; // effect distance of seduction
 
     ExtraTime = 30000; // amount of time (ms) given for using Extra Time
 
--- a/hedgewars/uGearsList.pas	Sun Jun 02 17:19:07 2019 +0200
+++ b/hedgewars/uGearsList.pas	Sun Jun 02 17:34:47 2019 +0200
@@ -395,7 +395,7 @@
                 gear^.State:= Gear^.State or gstSubmersible
                 end;
    gtSeduction: begin
-                gear^.Radius:= 250;
+                gear^.Radius:= cSeductionDist;
                 end;
  gtShotgunShot: begin
                 if gear^.Timer = 0 then gear^.Timer:= 900;
@@ -717,7 +717,7 @@
                 gear^.Tint:= $C0C000C0
                 end;
  gtResurrector: begin
-                gear^.Radius := 100;
+                gear^.Radius := cResurrectorDist;
                 gear^.Tag := 0;
                 gear^.Tint:= $F5DB35FF
                 end;
--- a/hedgewars/uGearsRender.pas	Sun Jun 02 17:19:07 2019 +0200
+++ b/hedgewars/uGearsRender.pas	Sun Jun 02 17:34:47 2019 +0200
@@ -840,7 +840,7 @@
                 amSeduction: if ((Gear^.State and gstMoving) = 0) then
                              begin
                              DrawSpriteRotated(sprHandSeduction, hx, hy, sign, aangle);
-                             DrawCircle(ox, oy, 248, 4, $FF, $00, $00, $AA);
+                             DrawCircle(ox, oy, cSeductionDist - 2, 4, $FF, $00, $00, $AA);
                              end;
                 amVampiric: DrawSpriteRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
                 amRubber,
@@ -886,7 +886,7 @@
                 amLandGun: DrawSpriteRotated(sprHandLandGun, hx, hy, sign, aangle);
                 amIceGun: DrawSpriteRotated(sprIceGun, hx, hy, sign, aangle);
                 amResurrector: if ((Gear^.State and gstMoving) = 0) then
-                    DrawCircle(ox, oy, 98, 4, $F5, $DB, $35, $AA); // I'd rather not like to hardcode 100 here
+                    DrawCircle(ox, oy, cResurrectorDist - 2, 4, $F5, $DB, $35, $AA);
                 amFirePunch: DrawSpriteRotatedF(sprFirePunch, hx + 6 * sign + 1, hy - 5, (RealTicks div 50) mod 16, sign, 0);
             end;