diff -r e570bc0df33c -r b817a478dcfb hedgewars/uLandPainted.pas --- a/hedgewars/uLandPainted.pas Sun Jun 24 09:12:53 2012 -0400 +++ b/hedgewars/uLandPainted.pas Sun Jun 24 13:18:33 2012 -0400 @@ -27,7 +27,7 @@ procedure freeModule; implementation -uses uLandGraphics, uConsts, uUtils, SDLh, uCommands, uDebug; +uses uLandGraphics, uConsts, uVariables, uUtils, SDLh, uCommands, uDebug; type PointRec = packed record X, Y: SmallInt; @@ -57,6 +57,10 @@ rec:= prec^; rec.X:= SDLNet_Read16(@rec.X); rec.Y:= SDLNet_Read16(@rec.Y); + if rec.X < -323 then rec.X:= -323; + if rec.X > LAND_WIDTH+323 then rec.X:= LAND_WIDTH+323; + if rec.Y < -323 then rec.Y:= -323; + if rec.Y > LAND_HEIGHT+323 then rec.Y:= LAND_HEIGHT+323; new(pe); if pointsListLast = nil then