Wrap around target coordinates when clicking on other side of wrap-around world edge
This fixes girder placement failure on other side (not across).
--- 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;