# HG changeset patch # User Wuzzy # Date 1543518541 -3600 # Node ID 1dcc37b6913eeb72df6997582b2854212ca81e0b # Parent 22c91ac48d38745753b5bc44c0102611b62fa512 Fix freezer failing to freeze gears with negative coordinate diff -r 22c91ac48d38 -r 1dcc37b6913e hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Thu Nov 29 19:06:33 2018 +0100 +++ b/hedgewars/uGearsHandlersMess.pas Thu Nov 29 20:09:01 2018 +0100 @@ -6432,7 +6432,7 @@ begin if (iter^.State and gstFrozen = 0) and ((iter^.Kind = gtExplosives) or (iter^.Kind = gtAirMine) or (iter^.Kind = gtCase) or (iter^.Kind = gtMine) or (iter^.Kind = gtSMine)) and - (abs(LongInt(iter^.X.Round) - target.x) + abs(LongInt(iter^.Y.Round) - target.y) + 2 < 2 * iceRadius) + (abs(hwRound(iter^.X) - target.x) + abs(hwRound(iter^.Y) - target.y) + 2 < 2 * iceRadius) and (Distance(iter^.X - int2hwFloat(target.x), iter^.Y - int2hwFloat(target.y)) < int2hwFloat(iceRadius * 2)) then begin for t:= 0 to 5 do