hedgewars/uLandPainted.pas
changeset 9472 265e5997580e
parent 9080 9b42757d7e71
child 9998 736015b847e3
--- a/hedgewars/uLandPainted.pas	Fri Sep 27 21:52:21 2013 -0400
+++ b/hedgewars/uLandPainted.pas	Mon Sep 30 00:20:58 2013 +0400
@@ -27,7 +27,7 @@
 procedure freeModule;
 
 implementation
-uses uLandGraphics, uConsts, uVariables, uUtils, SDLh, uCommands, uDebug;
+uses uLandGraphics, uConsts, uVariables, uUtils, SDLh, uCommands, uDebug, uScript;
 
 type PointRec = packed record
     X, Y: SmallInt;
@@ -88,7 +88,11 @@
     radius:= 0;
 
     pe:= pointsListHead;
-    TryDo((pe = nil) or (pe^.point.flags and $80 <> 0), 'Corrupted draw data', true);
+    while (pe <> nil) and (pe^.point.flags and $80 = 0) do
+        begin
+        ScriptCall('onSpecialPoint', pe^.point.X, pe^.point.Y, pe^.point.flags);
+        pe:= pe^.next;
+        end;
 
     while(pe <> nil) do
         begin
@@ -110,7 +114,7 @@
             end;
 
         prevPoint:= pe^.point;
-        pe:= pe^.next;  
+        pe:= pe^.next;
         end;
 end;