# HG changeset patch # User Stepan777 # Date 1340559153 -14400 # Node ID 24c6fa591866f4543a9c97a5aa4a5e54bde1a598 # Parent c65992e2d7945205451fbf14448320e671ad1523# Parent b817a478dcfb77ff3ffa1924840ed3ddbc4d2a66 merge diff -r c65992e2d794 -r 24c6fa591866 hedgewars/uLandPainted.pas --- a/hedgewars/uLandPainted.pas Sun Jun 24 21:15:20 2012 +0400 +++ b/hedgewars/uLandPainted.pas Sun Jun 24 21:32: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