Precalculate cMaxHogHealth
authorWuzzy <Wuzzy2@mail.ru>
Fri, 05 Oct 2018 21:31:58 +0200
changeset 13882 d82c580b6596
parent 13881 aba78789f0bf
child 13883 0ecf77e203c0
Precalculate cMaxHogHealth
hedgewars/uConsts.pas
--- a/hedgewars/uConsts.pas	Fri Oct 05 21:30:06 2018 +0200
+++ b/hedgewars/uConsts.pas	Fri Oct 05 21:31:58 2018 +0200
@@ -178,6 +178,7 @@
     // hedgehog info
     cMaxTeams        = 8; // maximum number of teams
     cMaxHHIndex      = 7; // maximum hedgehog index (counting starts at 0)
+                          // NOTE: If you change cMaxHHIndex, also change cMaxHogHealth!
     cMaxHHs          = cMaxTeams * (cMaxHHIndex+1); // maximum number of hogs
 
     cClanColors      = 9; // number of possible clan colors
@@ -187,7 +188,8 @@
     cHHRadius = 9; // hedgehog radius
     cHHStepTicks = 29;
 
-    cMaxHogHealth : LongInt = High(LongInt) div (cMaxHHIndex+1); // maximum hedgehog health
+    cMaxHogHealth = 268435455; // maximum hedgehog health
+    // cMaxHogHealth was calculated by: High(LongInt) div (cMaxHHIndex+1);
 
     // Z levels
     cHHZ = 1000;