Use Gear^.Boom to calculate cake party faces
authorWuzzy <Wuzzy2@mail.ru>
Mon, 23 Oct 2017 23:43:36 +0200
changeset 12746 e1395ba033e8
parent 12745 c162995831d8
child 12747 d3dad8de4aca
Use Gear^.Boom to calculate cake party faces
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Mon Oct 23 23:26:34 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Oct 23 23:43:36 2017 +0200
@@ -3243,7 +3243,7 @@
         //fY.QWordValue:= fY.QWordValue and $FFFFFFFF00000000;
         fX:= int2hwFloat(hwRound(Gear^.X));
         fY:= int2hwFloat(hwRound(Gear^.Y));
-        dmgBase:= cakeDmg shl 1 + cHHRadius div 2;
+        dmgBase:= Gear^.Boom shl 1 + cHHRadius div 2;
         partyEpicness:= 0;
         gi := GearsList;
         while gi <> nil do
@@ -3253,7 +3253,7 @@
                 dmg:= 0;
                 if hwRound(PointDistance(gi^.X, fX, gi^.Y, fY, true)) < dmgBase then
                     dmg:= dmgBase - max(hwRound(PointDistance(gi^.X, fX, gi^.Y, fY, true)), gi^.Radius);
-                if (dmg > 1) then dmg:= ModifyDamage(min(dmg div 2, cakeDmg), gi);
+                if (dmg > 1) then dmg:= ModifyDamage(min(dmg div 2, Gear^.Boom), gi);
                 if (dmg > 1) then
                     if (CurrentHedgehog^.Gear = gi) and (gi^.Hedgehog^.Effects[heInvulnerable] = 0) then
                         begin