# HG changeset patch # User sheepluva # Date 1418327205 -3600 # Node ID 0da243c01bdee4fb3fd4c4f5385281373da38b44 # Parent 79fa79c77c3842156fa0b0223e0f95b47fb56a14 world edge tweakes/fixes diff -r 79fa79c77c38 -r 0da243c01bde hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Thu Dec 11 17:50:05 2014 +0100 +++ b/hedgewars/uConsts.pas Thu Dec 11 20:46:45 2014 +0100 @@ -319,7 +319,7 @@ kSystemSoundID_Vibrate = $00000FFF; cMinPlayWidth = 200; - cWorldEdgeDist = 150; + cWorldEdgeDist = 200; implementation diff -r 79fa79c77c38 -r 0da243c01bde hedgewars/uLand.pas --- a/hedgewars/uLand.pas Thu Dec 11 17:50:05 2014 +0100 +++ b/hedgewars/uLand.pas Thu Dec 11 20:46:45 2014 +0100 @@ -578,10 +578,19 @@ if hasBorder then begin - for y:= 0 to LAND_HEIGHT - 1 do - for x:= 0 to LAND_WIDTH - 1 do - if (y < topY) or (x < leftX) or (x > rightX) then + if WorldEdge = weNone then + begin + for y:= 0 to LAND_HEIGHT - 1 do + for x:= 0 to LAND_WIDTH - 1 do + if (y < topY) or (x < leftX) or (x > rightX) then + Land[y, x]:= lfIndestructible; + end + else if topY > 0 then + begin + for y:= 0 to LongInt(topY) - 1 do + for x:= 0 to LAND_WIDTH - 1 do Land[y, x]:= lfIndestructible; + end; // experiment hardcoding cave // also try basing cave dimensions on map/template dimensions, if they exist for w:= 0 to 5 do // width of 3 allowed hogs to be knocked through with grenade @@ -666,7 +675,9 @@ PrettifyLandAlpha(); -InitWorldEdges(); +// adjust world edges for borderless maps +if (WorldEdge <> weNone) and (not hasBorder) then + InitWorldEdges(); end;