--- a/hedgewars/uGearsUtils.pas Fri Sep 29 23:31:29 2017 +0200
+++ b/hedgewars/uGearsUtils.pas Sat Sep 30 00:09:48 2017 +0200
@@ -709,10 +709,10 @@
if isDirH then
begin
tmp:= hwRound(Gear^.X - Gear^.dX);
- if abs(tmp - leftX) < abs(tmp - rightX) then // left edge
- isImpact:= (abs(tmp-leftX) >= Gear^.Radius) and (Gear^.dX.isNegative)
+ if abs(tmp - real(leftX)) < abs(tmp - real(rightX)) then // left edge
+ isImpact:= (abs(tmp-real(leftX)) >= Gear^.Radius) and (Gear^.dX.isNegative)
else
- isImpact:= (abs(tmp-rightX) >= Gear^.Radius) and (not Gear^.dX.isNegative);
+ isImpact:= (abs(tmp-real(rightX)) >= Gear^.Radius) and (not Gear^.dX.isNegative);
end
else
begin