Fix right limit of piano placement in bounce world edge
authorWuzzy <Wuzzy2@mail.ru>
Mon, 01 Apr 2019 18:49:08 +0200
changeset 14737 52916435d9b1
parent 14736 3246e5c8cf69
child 14738 c760a2939b9c
Fix right limit of piano placement in bounce world edge It was slightly beyond the right bounce edge.
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Mon Apr 01 17:35:07 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Apr 01 18:49:08 2019 +0200
@@ -5255,7 +5255,7 @@
     if (WorldEdge = weBounce) then
         if (hwRound(Gear^.X) - Gear^.Radius < leftX) then
             valid := false
-        else if (hwRound(Gear^.X) - Gear^.Radius > rightX) then
+        else if (hwRound(Gear^.X) + Gear^.Radius > rightX) then
             valid := false;
 
     if (not valid) then