[Orxonox-commit 6175] r10833 - code/branches/planetLevelHS15/data/levels

luhug at orxonox.net luhug at orxonox.net
Mon Nov 23 13:15:37 CET 2015


Author: luhug
Date: 2015-11-23 13:15:36 +0100 (Mon, 23 Nov 2015)
New Revision: 10833

Modified:
   code/branches/planetLevelHS15/data/levels/luaTest.oxw
Log:
minor changes to luaTest.oxw

Modified: code/branches/planetLevelHS15/data/levels/luaTest.oxw
===================================================================
--- code/branches/planetLevelHS15/data/levels/luaTest.oxw	2015-11-23 10:17:22 UTC (rev 10832)
+++ code/branches/planetLevelHS15/data/levels/luaTest.oxw	2015-11-23 12:15:36 UTC (rev 10833)
@@ -25,27 +25,10 @@
     returnString = ""
     for currentX = 1, x, 1 do
       for currentY = 1, y, 1 do
-        houseNr = math.floor(math.random()*4 + 1)
+        houseNr = math.floor(math.random()*4)
         orientation = math.floor(math.random()*4)
-	if houseNr == 1 then
-          houseString = "PrimeTower"
-	  houseHeight = 0
-	elseif houseNr == 2 then
-	  houseString = "Glasstower1"
-	  houseHeight = 0
-	elseif houseNr == 3 then
-          houseString = "ETH"
-	  houseHeight = 0
-	elseif houseNr == 4 then
-	  houseString = "Hausc1"
-	  houseHeight = 0
-	elseif houseNr == 5 then
-          houseString = "haus5"
-	  houseHeight = 0
-	elseif houseNr == 6 then
-	  houseString = "haus1"
-	  houseHeight = 0
-	end
+        houses = {"PrimeTower","Glasstower1","ETH","Hausc1","haus5","haus1"}
+	      houseString = houses[houseNr]
         
         returnString = returnString .. "<StaticEntity position=\"" .. (currentX - (cellSize/2)) .. "," .. (currentX - (cellSize/2)) .. "," .. (houseHeight/2) .. "\" direction=\"0,0,1\" pitch=\"0\" roll=\"0\" yaw=\"" .. (orientation*90) .. "\"> <attached> <Model position=\"0,0,0\" mesh=\"" .. houseString .. ".mesh\" scale3D=\"100\"/></attached></StaticEntity>\n\n"
       end




More information about the Orxonox-commit mailing list