# HG changeset patch # User Wuzzy # Date 1480002733 -3600 # Node ID e2be2e6cf544e332d5ca9e3a54761eacbd12a46b # Parent 18677a537d5866c1e9e549589982b91b8480cc85 WxW: Increase wall height of left/right walls with bounce edge and no border diff -r 18677a537d58 -r e2be2e6cf544 share/hedgewars/Data/Scripts/Multiplayer/WxW.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua Thu Nov 24 16:25:39 2016 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua Thu Nov 24 16:52:13 2016 +0100 @@ -517,13 +517,28 @@ end end + -- Border conditions + -- Just a wrapper for MapHasBorder() + local border = MapHasBorder() == true + -- Left and right walls are available + local leftRight = (WorldEdge == weBounce) or (WorldEdge == weNone and border) + local left, right, roof - left = {LeftX+10,TopY+10,margin,WaterLine} - right = {RightX-10-margin,TopY+10,margin,WaterLine} - roof = {LeftX+10,TopY+10,RightX-LeftX-20,margin} - local border = MapHasBorder() == true - local leftRight = (WorldEdge == weBounce) or (WorldEdge == weNone and border) + local startY, height + if (not border) and (WorldEdge == weBounce) then + -- Higher left/right walls for bouncy world edge without roof + local h = math.max(1024, LAND_HEIGHT) + height = h * 2 + startY = TopY - h + else + -- Standard left/right wall height + height = WaterLine + startY = TopY + 10 + end + left = {LeftX+10, startY, margin, height} + right = {RightX-10-margin, startY, margin, height} + roof = {LeftX+10, TopY+10, RightX-LeftX-20, margin} if mapID ~= nil then if border and MapList[mapID][3] == true then