don't draw a border if there's already a bottom border, avoid placing objects over gaps in the floor
authornemo
Sat, 11 May 2013 23:36:39 -0400
changeset 8980 37f4cdd9cd2c
parent 8979 860836494821
child 8981 6213f45b5ead
don't draw a border if there's already a bottom border, avoid placing objects over gaps in the floor
hedgewars/uScript.pas
share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua
--- a/hedgewars/uScript.pas	Sat May 11 23:23:17 2013 -0400
+++ b/hedgewars/uScript.pas	Sat May 11 23:36:39 2013 -0400
@@ -2262,6 +2262,7 @@
 ScriptSetInteger('gfMultiWeapon', gfMultiWeapon);
 ScriptSetInteger('gfSolidLand', gfSolidLand);
 ScriptSetInteger('gfBorder', gfBorder);
+ScriptSetInteger('gfBottomBorder', gfBottomBorder);
 ScriptSetInteger('gfDivideTeams', gfDivideTeams);
 ScriptSetInteger('gfLowGravity', gfLowGravity);
 ScriptSetInteger('gfLaserSight', gfLaserSight);
--- a/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua	Sat May 11 23:23:17 2013 -0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua	Sat May 11 23:36:39 2013 -0400
@@ -344,17 +344,18 @@
     TemplateFilter = 0
     TotGen = 0
     Tries = 0
-    if GetRandom(2) == 0 then
-        AddPoint(-50,2030,10)
-        AddPoint(4150,2030)
+    if band(GameFlags,gfBottomBorder) == 0 and GetRandom(2) == 0 then
+        AddPoint(-50,2010,7)
+        AddPoint(4150,2010)
         for i = 0,GetRandom(3) do
             x = GetRandom(4096)
-            AddPoint(x,2200,GetRandom(50),true)
+            w = GetRandom(40)+10
+            AddPoint(x,2200,w,true)
             AddPoint(x,1900)
+            AddCollision(x,2010,w*10+6,76)
         end
     end
         
-        
     if GetRandom(2) == 0 then
         l = GetRandom(3)+1
         w = GetRandom(200)+200