Disable gtFlake on bordered maps
authornemo
Fri, 24 Dec 2010 16:13:28 -0500
changeset 4669 296dbccdf376
parent 4668 9d9523deb5e0
child 4670 f06c30d0b64c
Disable gtFlake on bordered maps
hedgewars/uGears.pas
hedgewars/uLandObjects.pas
--- a/hedgewars/uGears.pas	Fri Dec 24 22:39:20 2010 +0300
+++ b/hedgewars/uGears.pas	Fri Dec 24 16:13:28 2010 -0500
@@ -1121,7 +1121,7 @@
 if (GameFlags and gfArtillery) <> 0 then
     cArtillery:= true;
 
-if (Theme = 'Snow') or (Theme = 'Christmas') then
+if not hasBorder and ((Theme = 'Snow') or (Theme = 'Christmas')) then
     for i:= 0 to Pred(vobCount*2) do
         AddGear(GetRandom(LAND_WIDTH+1024)-512, LAND_HEIGHT - GetRandom(1024), gtFlake, 0, _0, _0, 0);
 end;
--- a/hedgewars/uLandObjects.pas	Fri Dec 24 22:39:20 2010 +0300
+++ b/hedgewars/uLandObjects.pas	Fri Dec 24 16:13:28 2010 -0500
@@ -466,7 +466,7 @@
 if (cReducedQuality and rqKillFlakes) <> 0 then
     numFlakes:= 0;
 
-if Theme <> 'Snow' then
+if ((GameFlags and gfBorder) <> 0) or ((Theme <> 'Snow') and (Theme <> 'Christmas')) then
     for i:= 0 to Pred(numFlakes) do
         AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake)
 else