avoid airmines too when spawning
authornemo
Tue, 17 Feb 2015 10:04:32 -0500
changeset 10829 158b5dd6b3c9
parent 10828 9867dd60a66a
child 10830 f3e903ace2d3
avoid airmines too when spawning
hedgewars/uGears.pas
hedgewars/uGearsList.pas
hedgewars/uTypes.pas
--- a/hedgewars/uGears.pas	Tue Feb 17 09:50:22 2015 -0500
+++ b/hedgewars/uGears.pas	Tue Feb 17 10:04:32 2015 -0500
@@ -994,6 +994,7 @@
             @doStepHedgehog,
             @doStepMine,
             @doStepCase,
+            @doStepAirMine,
             @doStepCase,
             @doStepBomb,
             @doStepShell,
@@ -1055,8 +1056,7 @@
             @doStepIceGun,
             @doStepAddAmmo,
             @doStepGenericFaller,
-            @doStepKnife,
-            @doStepAirMine);
+            @doStepKnife);
 begin
     doStepHandlers:= handlers;
 
--- a/hedgewars/uGearsList.pas	Tue Feb 17 09:50:22 2015 -0500
+++ b/hedgewars/uGearsList.pas	Tue Feb 17 10:04:32 2015 -0500
@@ -41,6 +41,7 @@
 (*       gtHedgehog *) , amNothing
 (*           gtMine *) , amMine
 (*           gtCase *) , amNothing
+(*        gtAirMine *) , amAirMine
 (*     gtExplosives *) , amNothing
 (*        gtGrenade *) , amGrenade
 (*          gtShell *) , amBazooka
@@ -103,7 +104,6 @@
 (*        gtAddAmmo *) , amNothing
 (*  gtGenericFaller *) , amNothing
 (*          gtKnife *) , amKnife
-(*        gtAirMine *) , amAirMine
     );
 
 
--- a/hedgewars/uTypes.pas	Tue Feb 17 09:50:22 2015 -0500
+++ b/hedgewars/uTypes.pas	Tue Feb 17 10:04:32 2015 -0500
@@ -92,20 +92,21 @@
             );
 
     // Gears that interact with other Gears and/or Land
-    TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives, // these gears should be avoided when searching a spawn place
-            gtGrenade, gtShell, gtGrave, gtBee, // 8
-            gtShotgunShot, gtPickHammer, gtRope,  // 11
-            gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 16
-            gtFirePunch, gtATStartGame, // 18
-            gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 23
-            gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 28
-            gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 34
-            gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40
-            gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 44
-            gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50
-            gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55
+    // first row of gears (<gtExplosives) should be avoided when searching a spawn place
+    TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtAirMine, gtExplosives, 
+            gtGrenade, gtShell, gtGrave, gtBee, // 9
+            gtShotgunShot, gtPickHammer, gtRope,  // 12
+            gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 17
+            gtFirePunch, gtATStartGame, // 19
+            gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 24
+            gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 29
+            gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 35
+            gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 41
+            gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 45
+            gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
+            gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
-            gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtAirMine); // 66
+            gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife); // 65
 
     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,