hedgewars/uAIMisc.pas
changeset 7687 c73fd8cfa7c0
parent 7651 4cd85eebc54b
child 7716 95117607b81a
equal deleted inserted replaced
7613:ce6ead3327b2 7687:c73fd8cfa7c0
   427         if abs(Point.x - x) + abs(Point.y - y) < dmgBase then
   427         if abs(Point.x - x) + abs(Point.y - y) < dmgBase then
   428             dmg:= trunc(dmgMod * min((dmgBase - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y)))) div 2, r));
   428             dmg:= trunc(dmgMod * min((dmgBase - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y)))) div 2, r));
   429 
   429 
   430         if dmg > 0 then
   430         if dmg > 0 then
   431             begin
   431             begin
   432             if Flags and afTrackFall <> 0 then
   432             if (Flags and afTrackFall <> 0) and (dmg < abs(Score)) then
   433                 begin
   433                 begin
   434                 dX:= 0.005 * dmg + 0.01;
   434                 dX:= 0.005 * dmg + 0.01;
   435                 dY:= dX;
   435                 dY:= dX;
   436                 if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and 
   436                 if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and 
   437                    (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then
   437                    (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then