New game flag for non-destroyable land
authorunc0rr
Sat, 20 Oct 2007 17:27:06 +0000
changeset 621 8bdbc240f50f
parent 620 451cabd49241
child 622 cedd47d956ec
New game flag for non-destroyable land
hedgewars/uConsts.pas
hedgewars/uGears.pas
--- a/hedgewars/uConsts.pas	Sat Oct 20 13:49:36 2007 +0000
+++ b/hedgewars/uConsts.pas	Sat Oct 20 17:27:06 2007 +0000
@@ -102,7 +102,7 @@
       cMaxPower     = 1500;
       cMaxAngle     = 2048;
       cPowerDivisor = 1500;
-      
+
       MAXNAMELEN = 32;
 
       COLOR_LAND = $00FFFFFF;
@@ -138,6 +138,7 @@
 
       gfForts       = $00000001;
       gfMultiWeapon = $00000002;
+      gfSolidLand   = $00000004;
       gfOneClanMode = $10000000;
 
       gstDrowning       = $00000001;
--- a/hedgewars/uGears.pas	Sat Oct 20 13:49:36 2007 +0000
+++ b/hedgewars/uGears.pas	Sat Oct 20 17:27:06 2007 +0000
@@ -707,7 +707,8 @@
          end;
       Gear:= Gear^.NextGear
       end;
-if (Mask and EXPLDontDraw) = 0 then DrawExplosion(X, Y, Radius);
+if (Mask and EXPLDontDraw) = 0 then
+   if (GameFlags and gfSolidLand) = 0 then DrawExplosion(X, Y, Radius);
 uAIMisc.AwareOfExplosion(0, 0, 0)
 end;
 
@@ -748,7 +749,7 @@
            end;
     t:= t^.NextGear
     end;
-DrawExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), cShotgunRadius)
+if (GameFlags and gfSolidLand) = 0 then DrawExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), cShotgunRadius)
 end;
 
 procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt);