--- a/hedgewars/GSHandlers.inc Mon Jun 28 21:52:00 2010 +0200
+++ b/hedgewars/GSHandlers.inc Tue Jun 29 05:22:25 2010 +0200
@@ -1238,14 +1238,15 @@
HHGear^.dY := SignAs(hwAbs(HHGear^.dY) + _0_2, HHGear^.dY)
end;
- len := Distance(HHGear^.dX, HHGear^.dY);
- if len > _0_8 then
+ len := hwSqr(HHGear^.dX) + hwSqr(HHGear^.dY);
+ if len > _0_64 then
begin
- len := _0_8 / len;
+ len := _0_8 / hwSqrt(len);
HHGear^.dX := HHGear^.dX * len;
HHGear^.dY := HHGear^.dY * len;
end;
+
if (Gear^.Message and gm_Attack) <> 0 then
if (Gear^.State and gsttmpFlag) <> 0 then
with PHedgehog(Gear^.Hedgehog)^ do
--- a/hedgewars/uFloat.pas Mon Jun 28 21:52:00 2010 +0200
+++ b/hedgewars/uFloat.pas Tue Jun 29 05:22:25 2010 +0200
@@ -98,6 +98,7 @@
_0_5: hwFloat = (isNegative: false; QWordValue: 2147483648);
_0_55: hwFloat = (isNegative: false; QWordValue: 2362232012);
_0_6: hwFloat = (isNegative: false; QWordValue: 2576980377);
+ _0_64: hwFloat = (isNegative: false; QWordValue: 2748779064);
_0_7: hwFloat = (isNegative: false; QWordValue: 3006477107);
_0_8: hwFloat = (isNegative: false; QWordValue: 3435973837);
_0_84: hwFloat = (isNegative: false; QWordValue: 3607772528);