remove Hedgehog from generated mines
authoralfadur
Mon, 09 May 2022 20:03:09 +0300
changeset 15865 a722c8e86573
parent 15864 4172debdff61
child 15866 4e3c340eb766
remove Hedgehog from generated mines
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Mon May 09 19:10:43 2022 +0300
+++ b/hedgewars/uGears.pas	Mon May 09 20:03:09 2022 +0300
@@ -860,6 +860,7 @@
 while (i < cLandMines) and (unplaced < 4) do
     begin
     Gear:= AddGear(0, 0, gtMine, 0, _0, _0, 0);
+    Gear^.Hedgehog := nil;
     FindPlace(Gear, false, 0, LAND_WIDTH);
 
     if Gear = nil then
@@ -875,6 +876,7 @@
 while (i < cExplosives) and (unplaced < 4) do
     begin
     Gear:= AddGear(0, 0, gtExplosives, 0, _0, _0, 0);
+    Gear^.Hedgehog := nil;
     FindPlace(Gear, false, 0, LAND_WIDTH);
 
     if Gear = nil then
@@ -940,7 +942,8 @@
                 inc(i);
                 AddFileLog('Placed Air Mine @ (' + inttostr(rx) + ',' + inttostr(ry) + ')');
                 if i < cAirMines then
-                    Gear:= AddGear(0, 0, gtAirMine, 0, _0, _0, 0)
+                    Gear:= AddGear(0, 0, gtAirMine, 0, _0, _0, 0);
+                    Gear^.Hedgehog := nil
                 end
             end
         else