merge
authorStepan777 <stepik-777@mail.ru>
Sun, 24 Jun 2012 21:32:33 +0400
changeset 7284 24c6fa591866
parent 7282 c65992e2d794 (current diff)
parent 7277 b817a478dcfb (diff)
child 7286 068adc6948e3
merge
--- 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