hedgewars/uVisualGears.pas
changeset 4159 64e677349124
parent 4034 634a8c8682de
child 4279 b697a26ed538
--- a/hedgewars/uVisualGears.pas	Sun Nov 07 16:33:42 2010 +0300
+++ b/hedgewars/uVisualGears.pas	Sun Nov 07 16:41:03 2010 +0300
@@ -369,7 +369,7 @@
       if Gear^.Kind = vgtFlake then
           begin
           // Damage calc from doMakeExplosion
-          dmg:= min(101, int64(Radius) + cHHRadius div 2 - (round(abs(Gear^.X - float(X))+abs(Gear^.Y - float(Y))) div 5));
+          dmg:= min(101, Radius + cHHRadius div 2 - LongInt(abs(round(Gear^.X) - X) + abs(round(Gear^.Y) - Y)) div 5);
           if dmg > 1 then
               begin
               Gear^.tdX:= 0.02 * dmg + 0.01;