hedgewars/uLandGenTemplateBased.pas
changeset 14100 4d22be35cfa2
parent 13903 e26573441808
child 14282 6015b74eea55
equal deleted inserted replaced
14099:7845beb87cb5 14100:4d22be35cfa2
   162     for i:= 0 to LongInt(pa.Count) - 2 do
   162     for i:= 0 to LongInt(pa.Count) - 2 do
   163         if pa.ar[i].x = NTPX then
   163         if pa.ar[i].x = NTPX then
   164             fp:= pa.ar[i + 1]
   164             fp:= pa.ar[i + 1]
   165         else if (i <> si) then
   165         else if (i <> si) then
   166         begin
   166         begin
   167         p4:= pa.ar[i + 1];
   167             p4:= pa.ar[i + 1];
   168         if p4.x = NTPX then
   168             if p4.x = NTPX then
   169             p4:= fp;
   169                 p4:= fp;
   170 
   170 
   171             // check if it intersects
   171             // check if it intersects
   172             t1:= (mp.x - pa.ar[i].x) * b - a * (mp.y - pa.ar[i].y);
   172             t1:= (mp.x - pa.ar[i].x) * b - a * (mp.y - pa.ar[i].y);
   173             t2:= (mp.x - p4.x) * b - a * (mp.y - p4.y);
   173             t2:= (mp.x - p4.x) * b - a * (mp.y - p4.y);
   174 
   174