515 if Map == MapList[i][1] then |
515 if Map == MapList[i][1] then |
516 mapID = i |
516 mapID = i |
517 end |
517 end |
518 end |
518 end |
519 |
519 |
|
520 -- Border conditions |
|
521 -- Just a wrapper for MapHasBorder() |
|
522 local border = MapHasBorder() == true |
|
523 -- Left and right walls are available |
|
524 local leftRight = (WorldEdge == weBounce) or (WorldEdge == weNone and border) |
|
525 |
520 local left, right, roof |
526 local left, right, roof |
521 left = {LeftX+10,TopY+10,margin,WaterLine} |
527 |
522 right = {RightX-10-margin,TopY+10,margin,WaterLine} |
528 local startY, height |
523 roof = {LeftX+10,TopY+10,RightX-LeftX-20,margin} |
529 if (not border) and (WorldEdge == weBounce) then |
524 |
530 -- Higher left/right walls for bouncy world edge without roof |
525 local border = MapHasBorder() == true |
531 local h = math.max(1024, LAND_HEIGHT) |
526 local leftRight = (WorldEdge == weBounce) or (WorldEdge == weNone and border) |
532 height = h * 2 |
|
533 startY = TopY - h |
|
534 else |
|
535 -- Standard left/right wall height |
|
536 height = WaterLine |
|
537 startY = TopY + 10 |
|
538 end |
|
539 left = {LeftX+10, startY, margin, height} |
|
540 right = {RightX-10-margin, startY, margin, height} |
|
541 roof = {LeftX+10, TopY+10, RightX-LeftX-20, margin} |
527 |
542 |
528 if mapID ~= nil then |
543 if mapID ~= nil then |
529 if border and MapList[mapID][3] == true then |
544 if border and MapList[mapID][3] == true then |
530 NewWallSet({roof, desc=loc("Roof")}, "roof") |
545 NewWallSet({roof, desc=loc("Roof")}, "roof") |
531 wallSetID = #wallSets |
546 wallSetID = #wallSets |