# HG changeset patch # User Wuzzy # Date 1508626118 -7200 # Node ID 7cbb0241d31c9fdefdb5f9ab84373060038da02f # Parent 83d62800d2152d9217c9989ffe728b4e2df29380 Wrap around target coordinates when clicking on other side of wrap-around world edge This fixes girder placement failure on other side (not across). diff -r 83d62800d215 -r 7cbb0241d31c hedgewars/uIO.pas --- a/hedgewars/uIO.pas Sat Oct 21 23:59:31 2017 +0200 +++ b/hedgewars/uIO.pas Sun Oct 22 00:48:38 2017 +0200 @@ -491,10 +491,12 @@ TargetPoint.X:= CursorPoint.X - WorldDx; TargetPoint.Y:= cScreenHeight - CursorPoint.Y - WorldDy; end; + TargetPoint.X:= CalcWorldWrap(TargetPoint.X, 0); SendIPCXY('p', TargetPoint.X, TargetPoint.Y); end else begin + TargetPoint.X:= CalcWorldWrap(TargetPoint.X, 0); TargetPoint.X:= putX; TargetPoint.Y:= putY end;