[Orxonox-commit 7292] r11909 - in code/branches/Hover_FS18: data/levels src/modules/hover

seilerra at orxonox.net seilerra at orxonox.net
Thu Apr 26 15:50:25 CEST 2018


Author: seilerra
Date: 2018-04-26 15:50:24 +0200 (Thu, 26 Apr 2018)
New Revision: 11909

Removed:
   code/branches/Hover_FS18/src/modules/hover/HoverWall.cc
   code/branches/Hover_FS18/src/modules/hover/HoverWall.h
   code/branches/Hover_FS18/src/modules/hover/MazeGenerator.cc
   code/branches/Hover_FS18/src/modules/hover/MazeGenerator.h
Modified:
   code/branches/Hover_FS18/data/levels/Hover.oxw
   code/branches/Hover_FS18/src/modules/hover/CMakeLists.txt
   code/branches/Hover_FS18/src/modules/hover/Hover.cc
Log:
update 2

Modified: code/branches/Hover_FS18/data/levels/Hover.oxw
===================================================================
--- code/branches/Hover_FS18/data/levels/Hover.oxw	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/data/levels/Hover.oxw	2018-04-26 13:50:24 UTC (rev 11909)
@@ -1,5 +1,5 @@
 <LevelInfo
- name = "Hover level"
+ name = "Hover"
  description = "Level for Minigame Hover"
  tags = "minigame"
  screenshot = "emptylevel.png"
@@ -17,13 +17,6 @@
   include("overlays/HoverHUD.oxo")
 ?>
 
-/*<?lua
-MAZE_NUM_CELLS = 10
-MAZE_CELL_SIZE = 100
-MAZE_CELL_HEIGHT = 30
-MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE
-?>*/
-
 <Level
 plugins = hover
 gametype = Hover
@@ -39,109 +32,111 @@
     gravity      = "0, -200, 0"
   >
 
+<StaticEntity position="0, 0, 0" collisionType = "none">
+<attached>
+<Model mesh="hover_level.mesh" scale="200"/>
+</attached>
+<collisionShapes>
+<BoxCollisionShape position="-822.0, 2372.286, 190.15" halfExtents="100.0, 0.0, 100.0" />
+<BoxCollisionShape position="-1472.0, 1190.204, 2450.828" halfExtents="139.999, 0.0, 140.0" />
+   </collisionShapes>
+</StaticEntity>
     <StaticEntity position="0,0,0" collisionType="static">
-      <attached>
-        /*<HoverOrigin
+      <!-- <attached>
+        <HoverOrigin
           numCells="<?lua print(MAZE_NUM_CELLS)?>"
           cellSize="<?lua print(MAZE_CELL_SIZE)?>"
           cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>"
-        />*/
+        />
     
-      </attached> 
+      </attached> -->
       <collisionShapes>
         
       
-<BoxCollisionShape position="-5.10, -5.61264, 12.86143" halfExtents="8, 0.4, 1" />
-<BoxCollisionShape position="2.50, 1.98736, 12.86143" halfExtents="0.4, 8, 1" />
-<BoxCollisionShape position="-12.72, 1.98736, 12.86143" halfExtents="0.38, 8, 1" />
-<BoxCollisionShape position="-5.50, 9.98736, 12.86143" halfExtents="7.6, 0, 1" />
-<BoxCollisionShape position="0.15, 7.22736, 12.86143" halfExtents="0.2166, 2, 1" />
-<BoxCollisionShape position="-2.57, 6.93236, 12.86143" halfExtents="2.5, 0.255, 1" />
-<BoxCollisionShape position="0.65, 5.52736, 12.86143" halfExtents="0.7166, 0.3, 1" />
-<BoxCollisionShape position="-3.77, 3.95236, 12.86143" halfExtents="0.3, 1.275, 1" />
-<BoxCollisionShape position="-7.84, 6.05056, 12.86143" halfExtents="4.5, 0.2888, 1" />
-<BoxCollisionShape position="-5.72, 7.36936, 12.86143" halfExtents="2.375, 1.03, 1" />
-<BoxCollisionShape position="-9.28, 4.27176, 12.86143" halfExtents="0.34, 1.51, 1" />
-<BoxCollisionShape position="-10.20, -3.21264, 12.86143" halfExtents="0.356665, 2, 1" />
-<BoxCollisionShape position="0.10, -2.73979, 12.86143" halfExtents="2, 0.30685, 1" />
-<BoxCollisionShape position="-1.60, -3.23979, 12.86143" halfExtents="0.3, 0.80685, 1" />
-<BoxCollisionShape position="0.99, -0.93294, 12.86143" halfExtents="0.255, 1.5, 1" />
-<BoxCollisionShape position="0.10, 3.13485, 12.86143" halfExtents="2, 0.32066, 1" />
-<BoxCollisionShape position="-0.86, 0.81419, 12.86143" halfExtents="0.24, 2, 1" />
-<BoxCollisionShape position="-3.19, -3.21264, 12.86143" halfExtents="0.23495, 2, 1" />
-<BoxCollisionShape position="-6.24, 0.11736, 12.86143" halfExtents="0.3125, 2.5, 1" />
-<BoxCollisionShape position="-4.87, -0.34754, 12.86143" halfExtents="3.559405, 2.6651, 1" />
-<BoxCollisionShape position="-8.10, -0.69764, 12.86143" halfExtents="0.328125, 2.315, 1" />
-<BoxCollisionShape position="-9.60, 1.31736, 12.86143" halfExtents="1.828125, 0.3, 1" />
-<BoxCollisionShape position="11.55, 4.36787, 6.92041" halfExtents="0.532, 11.2, 1" />
-<BoxCollisionShape position="0.88, 15.00787, 6.92041" halfExtents="11.199995, 0.56, 1" />
-<BoxCollisionShape position="-9.76, 4.36787, 6.92041" halfExtents="0.5600005, 11.2, 1" />
-<BoxCollisionShape position="0.88, -6.30013, 6.92041" halfExtents="11.1999955, 0.532, 1" />
-<BoxCollisionShape position="4.17, 2.37345, 6.92041" halfExtents="4.45, 0.75, 1" />
-<BoxCollisionShape position="8.17, 0.62345, 6.92041" halfExtents="0.450005, 2.5, 1" />
-<BoxCollisionShape position="8.02, -2.30614, 6.92041" halfExtents="2.999995, 0.42959, 1" />
-<BoxCollisionShape position="2.32, -4.77813, 6.92041" halfExtents="0.606475, 0.99, 1" />
-<BoxCollisionShape position="7.52, 5.918365, 6.92041" halfExtents="3.499995, 0.448925, 1" />
-<BoxCollisionShape position="4.41, 7.918365, 6.92041" halfExtents="0.39375, 2.448925, 1" />
-<BoxCollisionShape position="7.69, 9.36729, 6.92041" halfExtents="0.525005, 3, 1" />
-<BoxCollisionShape position="8.96, 10.49214, 6.92041" halfExtents="0.73963, 0.33091, 1" />
-<BoxCollisionShape position="2.35, 11.94787, 6.92041" halfExtents="0.296195, 2.5, 1" />
-<BoxCollisionShape position="-0.44, 12.47837, 6.92041" halfExtents="2.5, 0.33672, 1" />
-<BoxCollisionShape position="-5.15, 12.44787, 6.92041" halfExtents="0.450215, 2, 1" />
-<BoxCollisionShape position="-5.20, 5.80553, 6.92041" halfExtents="4, 0.45486, 1" />
-<BoxCollisionShape position="-1.60, 7.805535, 6.92041" halfExtents="0.4, 2.454865, 1" />
-<BoxCollisionShape position="-5.73, 3.85067, 6.92041" halfExtents="0.495, 1.5, 1" />
-<BoxCollisionShape position="-6.41, -2.74313, 6.92041" halfExtents="0.49125, 3.025, 1" />
-<BoxCollisionShape position="-2.92, -1.83063, 6.92041" halfExtents="3, 0.5625, 1" />
-<BoxCollisionShape position="0.00, 13.998825, 1" halfExtents="14.5, 0.501175, 1" />
-<BoxCollisionShape position="-14.07, 0, 1" halfExtents="0.42622, 14.5, 1" />
-<BoxCollisionShape position="0.00, -14.01435, 1" halfExtents="14.5, 0.48565, 1" />
-<BoxCollisionShape position="14.00, 0, 1" halfExtents="0.497965, 14.5, 1" />
-<BoxCollisionShape position="10.74, 10.49765, 1" halfExtents="0.37487, 3, 1" />
-<BoxCollisionShape position="8.18, 9.59765, 1" halfExtents="2.18399, 0, 1" />
-<BoxCollisionShape position="1.67, 11.47789, 1" halfExtents="0.392845, 2.01976, 1" />
-<BoxCollisionShape position="-7.15, 9.70307, 1" halfExtents="6.5, 0.45207, 1" />
-<BoxCollisionShape position="-5.54, 5.751, 1" halfExtents="0.731825, 3.5, 1" />
-<BoxCollisionShape position="-10.15, 3.471825, 1" halfExtents="3.5, 0.418405, 1" />
-<BoxCollisionShape position="-8.71, 4.72713, 1" halfExtents="2.059455, 1.67371, 1" />
-<BoxCollisionShape position="-10.52, -7.5287, 1" halfExtents="0.4158, 6, 1" />
-<BoxCollisionShape position="10.50, -1.41018, 1" halfExtents="3, 0.41642, 1" />
-<BoxCollisionShape position="7.91, 1.8694, 1" halfExtents="0.409645, 2.86316, 1" />
-<BoxCollisionShape position="9.76, 4.31938, 1" halfExtents="1.44061, 0.41318, 1" />
-<BoxCollisionShape position="7.50, -8.712205, 1" halfExtents="6, 0.310035, 1" />
-<BoxCollisionShape position="9.00, -10.157485, 1" halfExtents="0.36514, 1.135245, 1" />
-<BoxCollisionShape position="4.56, -0.902175, 1" halfExtents="0.35412, 7.499995, 1" />
-<BoxCollisionShape position="1.98, 4.01242, 1" halfExtents="2.22454, 0.45625, 1" />
-<BoxCollisionShape position="-1.60, -3.82935, 1" halfExtents="5.802365, 0.28834, 1" />
-<BoxCollisionShape position="-3.93, -7.11769, 1" halfExtents="0.51491, 3, 1" />
-<BoxCollisionShape position="1.47, -1.480135, 1" halfExtents="0.39372, 2.060875, 1" />
-<BoxCollisionShape position="-4.11, 0.40075, 9.2805" halfExtents="0.6, 0.05, 2.58093" />
-<BoxCollisionShape position="-3.56, 0.95075, 9.2805" halfExtents="0.05, 0.6, 2.58093" />
-<BoxCollisionShape position="-4.11, 1.50075, 9.2805" halfExtents="0.6, 0.05, 2.58093" />
-<BoxCollisionShape position="-4.66, 0.95075, 9.2805" halfExtents="0.05, 0.6, 2.58093" />
-<BoxCollisionShape position="-7.36, 11.50414, 3.764645" halfExtents="0.8, 0.05, 2.186375" />
-<BoxCollisionShape position="-8.11, 12.25414, 3.764645" halfExtents="0.050005, 0.8, 2.186375" />
-<BoxCollisionShape position="-7.36, 13.00414, 3.764645" halfExtents="0.8, 0.05, 2.186375" />
-<BoxCollisionShape position="-6.61, 12.25414, 3.764645" halfExtents="0.05, 0.8, 2.186375" />
-<BoxCollisionShape position="-2.01, 3.01756, 6.10299" halfExtents="0.7, 0.7, 0.1" />
-<BoxCollisionShape position="-2.01, -4.18244, 2.820665" halfExtents="0.7, 6.5, 3.382325" />
-<BoxCollisionShape position="5.40, -4.01264, 8.96143" halfExtents="3.999995, 0.5, 3.1" />
-<BoxCollisionShape position="0.90, -4.01264, 11.96143" halfExtents="0.5, 0.5, 0.1" />
-<BoxCollisionShape position="0.88, 4.36787, 5.87041" halfExtents="11.199995, 11.2, 0.05" />
-<BoxCollisionShape position="-5.10, 1.98736, 11.81143" halfExtents="8, 8, 0.05" />
-<BoxCollisionShape position="0.00, 0, -0.05" halfExtents="14.5, 14.5, 0.05" />
-</collisionShapes>
+<!--<BoxCollisionShape position="-1020.0, 2572.286, -1122.528" halfExtents="1600.0, 200.0, 80.0" />
+<BoxCollisionShape position="500.0, 2572.286, 397.472" halfExtents="80.0, 200.0, 1600.0" />
+<BoxCollisionShape position="-2544.0, 2572.286, 397.472" halfExtents="76.0, 200.0, 1600.0" />
+<BoxCollisionShape position="-1100.0, 2572.286, 1997.472" halfExtents="1520.0, 200.0, 0.0" />
+<BoxCollisionShape position="30.0, 2572.286, 1445.472" halfExtents="43.32, 200.0, 400.0" />
+<BoxCollisionShape position="-514.0, 2572.286, 1386.472" halfExtents="500.0, 200.0, 51.0" />
+<BoxCollisionShape position="130.0, 2572.286, 1105.472" halfExtents="143.32, 200.0, 60.0" />
+<BoxCollisionShape position="-754.0, 2572.286, 790.472" halfExtents="60.0, 200.0, 255.0" />
+<BoxCollisionShape position="-1568.0, 2572.286, 1210.112" halfExtents="900.0, 200.0, 57.76" />
+<BoxCollisionShape position="-1144.0, 2572.286, 1473.872" halfExtents="475.0, 200.0, 206.0" />
+<BoxCollisionShape position="-1856.0, 2572.286, 854.352" halfExtents="68.0, 200.0, 302.0" />
+<BoxCollisionShape position="-2040.0, 2572.286, -642.528" halfExtents="71.333, 200.0, 400.0" />
+<BoxCollisionShape position="20.0, 2572.286, -547.958" halfExtents="400.0, 200.0, 61.37" />
+<BoxCollisionShape position="-320.0, 2572.286, -647.958" halfExtents="60.0, 200.0, 161.37" />
+<BoxCollisionShape position="198.0, 2572.286, -186.588" halfExtents="51.0, 200.0, 300.0" />
+<BoxCollisionShape position="20.0, 2572.286, 626.97" halfExtents="400.0, 200.0, 64.132" />
+<BoxCollisionShape position="-172.0, 2572.286, 162.838" halfExtents="48.0, 200.0, 400.0" />
+<BoxCollisionShape position="-638.0, 2572.286, -642.528" halfExtents="46.99, 200.0, 400.0" />
+<BoxCollisionShape position="-1248.0, 2572.286, 23.472" halfExtents="62.5, 200.0, 500.0" />
+<BoxCollisionShape position="-974.0, 2572.286, -69.508" halfExtents="711.881, 200.0, 533.02" />
+<BoxCollisionShape position="-1620.0, 2572.286, -139.528" halfExtents="65.625, 200.0, 463.0" />
+<BoxCollisionShape position="-1920.0, 2572.286, 263.472" halfExtents="365.625, 200.0, 60.0" />
+<BoxCollisionShape position="2310.0, 1384.082, 873.574" halfExtents="106.4, 200.0, 2240.0" />
+<BoxCollisionShape position="176.0, 1384.082, 3001.574" halfExtents="2239.999, 200.0, 112.0" />
+<BoxCollisionShape position="-1952.0, 1384.082, 873.574" halfExtents="112.0, 200.0, 2240.0" />
+<BoxCollisionShape position="176.0, 1384.082, -1260.026" halfExtents="2239.999, 200.0, 106.4" />
+<BoxCollisionShape position="834.0, 1384.082, 474.69" halfExtents="890.0, 200.0, 150.0" />
+<BoxCollisionShape position="1634.0, 1384.082, 124.69" halfExtents="90.001, 200.0, 500.0" />
+<BoxCollisionShape position="1604.0, 1384.082, -461.228" halfExtents="599.999, 200.0, 85.918" />
+<BoxCollisionShape position="464.0, 1384.082, -955.626" halfExtents="121.295, 200.0, 198.0" />
+<BoxCollisionShape position="1504.0, 1384.082, 1183.673" halfExtents="699.999, 200.0, 89.785" />
+<BoxCollisionShape position="882.0, 1384.082, 1583.673" halfExtents="78.75, 200.0, 489.785" />
+<BoxCollisionShape position="1538.0, 1384.082, 1873.458" halfExtents="105.001, 200.0, 600.0" />
+<BoxCollisionShape position="1792.0, 1384.082, 2098.428" halfExtents="147.926, 200.0, 66.182" />
+<BoxCollisionShape position="470.0, 1384.082, 2389.574" halfExtents="59.239, 200.0, 500.0" />
+<BoxCollisionShape position="-88.0, 1384.082, 2495.674" halfExtents="500.0, 200.0, 67.344" />
+<BoxCollisionShape position="-1030.0, 1384.082, 2489.574" halfExtents="90.043, 200.0, 400.0" />
+<BoxCollisionShape position="-1040.0, 1384.082, 1161.106" halfExtents="800.0, 200.0, 90.972" />
+<BoxCollisionShape position="-320.0, 1384.082, 1561.107" halfExtents="80.0, 200.0, 490.973" />
+<BoxCollisionShape position="-1146.0, 1384.082, 770.134" halfExtents="99.0, 200.0, 300.0" />
+<BoxCollisionShape position="-1282.0, 1384.082, -548.626" halfExtents="98.25, 200.0, 605.0" />
+<BoxCollisionShape position="-584.0, 1384.082, -366.126" halfExtents="600.0, 200.0, 112.5" />
+<BoxCollisionShape position="0.0, 200.0, 2799.765" halfExtents="2900.0, 200.0, 100.235" />
+<BoxCollisionShape position="-2814.0, 200.0, 0.0" halfExtents="85.244, 200.0, 2900.0" />
+<BoxCollisionShape position="0.0, 200.0, -2802.87" halfExtents="2900.0, 200.0, 97.13" />
+<BoxCollisionShape position="2800.0, 200.0, 0.0" halfExtents="99.593, 200.0, 2900.0" />
+<BoxCollisionShape position="2148.0, 200.0, 2099.53" halfExtents="74.974, 200.0, 600.0" />
+<BoxCollisionShape position="1636.0, 200.0, 1919.53" halfExtents="436.798, 200.0, 0.0" />
+<BoxCollisionShape position="334.0, 200.0, 2295.578" halfExtents="78.569, 200.0, 403.952" />
+<BoxCollisionShape position="-1430.0, 200.0, 1940.614" halfExtents="1300.0, 200.0, 90.414" />
+<BoxCollisionShape position="-1108.0, 200.0, 1150.2" halfExtents="146.365, 200.0, 700.0" />
+<BoxCollisionShape position="-2030.0, 200.0, 694.365" halfExtents="700.0, 200.0, 83.681" />
+<BoxCollisionShape position="-1742.0, 200.0, 945.426" halfExtents="411.891, 200.0, 334.742" />
+<BoxCollisionShape position="-2104.0, 200.0, -1505.74" halfExtents="83.16, 200.0, 1200.0" />
+<BoxCollisionShape position="2100.0, 200.0, -282.036" halfExtents="600.0, 200.0, 83.284" />
+<BoxCollisionShape position="1582.0, 200.0, 373.88" halfExtents="81.929, 200.0, 572.632" />
+<BoxCollisionShape position="1952.0, 200.0, 863.876" halfExtents="288.122, 200.0, 82.636" />
+<BoxCollisionShape position="1500.0, 200.0, -1742.441" halfExtents="1200.0, 200.0, 62.007" />
+<BoxCollisionShape position="1800.0, 200.0, -2031.497" halfExtents="73.028, 200.0, 227.049" />
+<BoxCollisionShape position="912.0, 200.0, -180.435" halfExtents="70.824, 200.0, 1499.999" />
+<BoxCollisionShape position="396.0, 200.0, 802.484" halfExtents="444.908, 200.0, 91.25" />
+<BoxCollisionShape position="-320.0, 200.0, -765.87" halfExtents="1160.473, 200.0, 57.668" />
+<BoxCollisionShape position="-786.0, 200.0, -1423.538" halfExtents="102.982, 200.0, 600.0" />
+<BoxCollisionShape position="294.0, 200.0, -296.027" halfExtents="78.744, 200.0, 412.175" />
+<BoxCollisionShape position="-822.0, 1856.1, 80.15" halfExtents="120.0, 516.186, 10.0" />
+<BoxCollisionShape position="-712.0, 1856.1, 190.15" halfExtents="10.0, 516.186, 120.0" />
+<BoxCollisionShape position="-822.0, 1856.1, 300.15" halfExtents="120.0, 516.186, 10.0" />
+<BoxCollisionShape position="-932.0, 1856.1, 190.15" halfExtents="10.0, 516.186, 120.0" />
+<BoxCollisionShape position="-1472.0, 752.929, 2300.828" halfExtents="160.0, 437.275, 10.0" />
+<BoxCollisionShape position="-1622.0, 752.929, 2450.828" halfExtents="10.001, 437.275, 160.0" />
+<BoxCollisionShape position="-1472.0, 752.929, 2600.828" halfExtents="160.0, 437.275, 10.0" />
+<BoxCollisionShape position="-1322.0, 752.929, 2450.828" halfExtents="10.0, 437.275, 160.0" />
+<BoxCollisionShape position="-402.0, 1220.598, 603.512" halfExtents="1, 20.0, 1" />-->
+<BoxCollisionShape position="-402.0, 564.133, -836.488" halfExtents="140.0, 676.465, 1300.0" />
+<BoxCollisionShape position="1080.0, 1792.286, -802.528" halfExtents="799.999, 620.0, 100.0" />
+<BoxCollisionShape position="180.0, 2392.286, -802.528" halfExtents="100.0, 20.0, 100.0" />
+<BoxCollisionShape position="176.0, 1174.082, 873.574" halfExtents="2239.999, 0.01, 2240.0" />
+<BoxCollisionShape position="-1020.0, 2362.286, 397.472" halfExtents="1600.0, 0.01, 1600.0" />
+<BoxCollisionShape position="0.0, -10, 0.0" halfExtents="2900.0, 0.01, 2900.0" />
 
-<StaticEntity position="0, 0, 0" collisionType = "none">
-<attached>
-<Model mesh =hover.mesh />
-</attached>
-<collisionShapes>
-<BoxCollisionShape position="-4.11, 0.95075, 11.86143" halfExtents="0.5, 0.5, 0" />
-<BoxCollisionShape position="-7.36, 12.25414, 5.95102" halfExtents="0.699995, 0.7, 0" />
+
 </collisionShapes>
+ </StaticEntity>
 
-    </StaticEntity>
 
     <Light
       type=directional
@@ -153,8 +148,8 @@
     
     <SpawnPoint
       team=0
-      position="4,10.1,0"
-      lookat="100,20,100"
+      position="0,0,0"
+      lookat="10,0,10"
       spawnclass=HoverShip
       pawndesign=spaceshiphover
     />

Modified: code/branches/Hover_FS18/src/modules/hover/CMakeLists.txt
===================================================================
--- code/branches/Hover_FS18/src/modules/hover/CMakeLists.txt	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/src/modules/hover/CMakeLists.txt	2018-04-26 13:50:24 UTC (rev 11909)
@@ -1,12 +1,10 @@
 SET_SOURCE_FILES(Hover_SRC_FILES
   Hover.cc
   HoverShip.cc
-  HoverWall.cc
   HoverOrigin.cc
   HoverFlag.cc
   TimeHUD.cc
   FlagHUD.cc
-  MazeGenerator.cc
 )
 
 ORXONOX_ADD_LIBRARY(hover

Modified: code/branches/Hover_FS18/src/modules/hover/Hover.cc
===================================================================
--- code/branches/Hover_FS18/src/modules/hover/Hover.cc	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/src/modules/hover/Hover.cc	2018-04-26 13:50:24 UTC (rev 11909)
@@ -34,9 +34,7 @@
 #include "Hover.h"
 
 #include "HoverOrigin.h"
-#include "HoverWall.h"
 #include "HoverFlag.h"
-#include "MazeGenerator.h"
 #include "core/CoreIncludes.h"
 
 namespace orxonox
@@ -58,41 +56,10 @@
     {
         SUPER(Hover, tick, dt);
 
-        if(this->firstTick_ && this->origin_)
+        /*if(this->firstTick_ && this->origin_)
         {
             this->firstTick_ = false;
 
-            int numCells = this->origin_->getNumCells();
-            int cellSize = this->origin_->getCellSize();
-            int cellHeight = this->origin_->getCellHeight();
-
-            MazeGenerator generator(numCells);
-            generator.generateMaze();
-            generator.renderMaze();
-
-            int* levelcode = generator.getLevelcode();
-
-            //Outer Walls
-            for(int i = 0; i<numCells; i++){
-                (new HoverWall(origin_->getContext()))->init(0,        i+1,      cellSize, cellHeight, 1);
-                (new HoverWall(origin_->getContext()))->init(numCells, i+1,      cellSize, cellHeight, 1);
-                (new HoverWall(origin_->getContext()))->init(i+1,      0,        cellSize, cellHeight, 2);
-                (new HoverWall(origin_->getContext()))->init(i+1,      numCells, cellSize, cellHeight, 2);
-            }
-
-            //Generate inner Walls according to levelcode
-            for(int y=0; y<numCells; y++){
-                for(int x=0; x<numCells; x++){
-                    switch(levelcode[ y * numCells + x ]){
-                        case 1: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
-                                break;
-                        case 3: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
-                        case 2: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 0);
-                        default: break;
-                    }
-                }   
-            }
-
             //Generate 5 flags randomly
             for ( int i = 0; i < 5; i++ )
             {
@@ -101,15 +68,15 @@
                 flags_.push_back(flag);
             }
 
-        }//firsttick end
+        }//firsttick end*/
 
         // Check if ship collided with one of the flags
-        for ( unsigned int i = 0; i < flags_.size(); i++ ){
+        /*for ( unsigned int i = 0; i < flags_.size(); i++ ){
             if(flags_[i]->getCollided()){
                 flags_[i]->destroyLater();
                 flags_.erase (flags_.begin()+i);
             }
         }
-        numberOfFlags_ = flags_.size();
+        numberOfFlags_ = flags_.size();*/
     }
 }

Deleted: code/branches/Hover_FS18/src/modules/hover/HoverWall.cc
===================================================================
--- code/branches/Hover_FS18/src/modules/hover/HoverWall.cc	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/src/modules/hover/HoverWall.cc	2018-04-26 13:50:24 UTC (rev 11909)
@@ -1,116 +0,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Manuel Meier
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file HoverWall.cc
-    @brief Represents one Wall piece in the Hover Game
-*/
-
-#include "HoverWall.h"
-
-#include "core/CoreIncludes.h"
-#include "graphics/Model.h"
-#include "objects/collisionshapes/BoxCollisionShape.h"
-
-namespace orxonox
-{
-    RegisterClass(HoverWall);
-
-    HoverWall::HoverWall(Context* context) : StaticEntity(context)
-    {
-        RegisterObject(HoverWall);
-
-        this->model_ = nullptr;
-        this->cs_ = nullptr;
-
-        this->enableCollisionCallback();
-        this->setCollisionResponse(true);
-        this->setCollisionType(CollisionType::Static);
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    HoverWall::~HoverWall()
-    {
-        if (this->isInitialized())
-        {
-            if (this->model_)
-                this->model_->destroy();
-            if (this->cs_)
-                this->cs_->destroy();
-        }
-    }
-
-    /**
-    @brief
-        Initializes a HoverWall
-    @param x
-        x-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
-    @param y
-        y-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
-    @param cellSize
-        The size of a cell
-    @param cellHeight
-        The height of a cell
-    @param orientation
-            Wall on the right side (1) or on top (2) of this square, 0-1        
-    */
-    void HoverWall::init(int x, int y, int cellSize, int cellHeight, int orientation)
-    {
-        int xSize_, zSize_, xPos_, zPos_;
-
-        if(orientation == 1){
-            xSize_ = cellSize/2;
-            zSize_ = 2;
-            zPos_ = x*cellSize;
-            xPos_ = y*cellSize-cellSize/2;
-        }
-        else{
-            xSize_ = 2;
-            zSize_ = cellSize/2;
-            zPos_ = x*cellSize-cellSize/2;
-            xPos_ = y*cellSize;
-        }
-
-
-        model_ = new Model(this->getContext());
-        model_->setMeshSource("CuboidBody.mesh");
-        model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
-        model_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
-
-        this->attach(model_);
-
-        cs_ = new BoxCollisionShape(this->getContext());
-        cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
-        cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
-
-        this->attachCollisionShape(cs_);
-    }
-}

Deleted: code/branches/Hover_FS18/src/modules/hover/HoverWall.h
===================================================================
--- code/branches/Hover_FS18/src/modules/hover/HoverWall.h	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/src/modules/hover/HoverWall.h	2018-04-26 13:50:24 UTC (rev 11909)
@@ -1,59 +0,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Manuel Meier
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file HoverWall.h
-    @brief See .cc-file for further information
-    @ingroup Hover
-*/
-
-#ifndef _HoverWall_H__
-#define _HoverWall_H__
-
-#include "HoverPrereqs.h"
-#include "objects/ObjectsPrereqs.h"
-
-#include "worldentities/StaticEntity.h"
-
-namespace orxonox
-{
-    class _HoverExport HoverWall : public StaticEntity
-    {
-        public:
-            HoverWall(Context* context);
-            virtual ~HoverWall();
-
-            void init(int x, int y, int cellSize, int cellHeight, int orientation);
-
-        private:
-            Model* model_;
-            BoxCollisionShape* cs_;
-    };
-}
-
-#endif /* _HoverWall_H__ */

Deleted: code/branches/Hover_FS18/src/modules/hover/MazeGenerator.cc
===================================================================
--- code/branches/Hover_FS18/src/modules/hover/MazeGenerator.cc	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/src/modules/hover/MazeGenerator.cc	2018-04-26 13:50:24 UTC (rev 11909)
@@ -1,255 +0,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Manuel Meier
- *   Co-authors:
- *      Cyrill Burgener
- *
- *   Based on random-maze-generator by Sergey Kosarevsky, 2014
- *   https://github.com/corporateshark/random-maze-generator
- *
- */
-
-/**
-    @file MazeGenerator.cc
-    @brief Implementation of the MazeGenerator class. Generates the maze.
-*/
-
-#include "MazeGenerator.h"
-
-#include <vector>
-
-#include "util/Output.h"
-#include "util/Math.h"
-
-namespace orxonox
-{
-    MazeGenerator::MazeGenerator(int numCells)
-    {
-        this->numCells_ = numCells;
-
-        //levelcode_ represents the pitch: It's a 10x10 field.
-        // 1 represents a Wall on the right side of this square
-        // 2 represents a Wall on the top of this square
-        // 3 represents 2 and 1 at the same time
-        // Note: the levelcode_ is generated from the Maze-Generator functions at the beginning of the game
-        this->levelcode_ = new int[ numCells_*numCells_ ];;
-        std::fill( levelcode_, levelcode_ + numCells_*numCells_, 0 );
-
-        this->maze_ = new unsigned char[ numCells_*numCells_ ];
-        std::fill( maze_, maze_ + numCells_*numCells_, 0 );
-
-        // current traversing position
-        this->ptX_ = 0;
-        this->ptY_ = 0;
-
-        //                  0  1  2  3  4  5  6  7  8
-        //                     U  R     D           L
-        int headingX[9] = { 0, 0,+1, 0, 0, 0, 0, 0,-1 };
-        int headingY[9] = { 0,-1, 0, 0,+1, 0, 0, 0, 0 };
-        int mask[9]     = {
-                              0,
-                              eDirection_Down | eDirection_Down << 4,
-                              eDirection_Left | eDirection_Left << 4,
-                              0,
-                              eDirection_Up | eDirection_Up << 4,
-                              0,
-                              0,
-                              0,
-                              eDirection_Right | eDirection_Right << 4
-                          };
-
-        std::copy(headingX, headingX + 9, this->headingX_);
-        std::copy(headingY, headingY + 9, this->headingY_);
-        std::copy(mask,     mask + 9,     this->mask_);
-    }
-
-    MazeGenerator::~MazeGenerator()
-    {
-        delete[] this->levelcode_;
-        delete[] this->maze_;
-    }
-
-    /**
-    @brief
-        Checks if Direction is valid (for Maze-Generator)
-    */
-    bool MazeGenerator::isDirValid( eDirection Dir )
-    {
-        int NewX = ptX_ + headingX_[ Dir ];
-        int NewY = ptY_ + headingY_[ Dir ];
-
-        if ( !Dir || NewX < 0 || NewY < 0 || NewX >= numCells_ || NewY >= numCells_ ) return false;
-
-        return !maze_[ NewX + numCells_ * NewY ];
-    }
-
-    /**
-    @brief
-        Generates new Direction (for Maze-Generator)
-    */
-    eDirection MazeGenerator::getDirection()
-    {
-        eDirection Dir = eDirection( 1 << randomInt4() );
-
-        while ( true )
-        {
-            for ( int x = 0; x < 4; x++ )
-            {
-                if ( isDirValid( Dir ) ) { return eDirection( Dir ); }
-
-                Dir = eDirection( Dir << 1 );
-
-                if ( Dir > eDirection_Left ) { Dir = eDirection_Up; }
-            }
-
-            Dir = eDirection( ( maze_[ cellIdx() ] & 0xf0 ) >> 4 );
-
-            // nowhere to go
-            if ( !Dir ) return eDirection_Invalid;
-
-            ptX_ += headingX_[ Dir ];
-            ptY_ += headingY_[ Dir ];
-
-            Dir = eDirection( 1 << randomInt4() );
-        }
-    }
-
-    /**
-    @brief
-        Generates a Maze (for Maze-Generator)
-    */
-    void MazeGenerator::generateMaze()
-    {
-
-        for ( eDirection Dir = getDirection(); Dir != eDirection_Invalid; Dir = getDirection() )
-        {
-            maze_[ cellIdx() ] |= Dir;
-
-            ptX_ += headingX_[ Dir ];
-            ptY_ += headingY_[ Dir ];
-
-            maze_[ cellIdx() ] = mask_[ Dir ];
-        }
-    }  
-    
-    /**
-    @brief
-        Print Maze (for Debugging only)
-    */
-    void MazeGenerator::mazeOut(){
-        for ( int y = 0; y < numCells_; y++ )
-        {
-            for ( int x = 0; x < numCells_; x++ )
-            {
-                char v = maze_[ y * numCells_ + x ];
-                orxout()<<"[";
-                if ( ( v & eDirection_Up    ) ) orxout()<<"U";
-                else orxout()<<" ";
-                if ( ( v & eDirection_Right ) ) orxout()<<"R";
-                else orxout()<<" ";
-                if ( ( v & eDirection_Down  ) ) orxout()<<" ";
-                else orxout()<<" ";
-                if ( ( v & eDirection_Left  ) ) orxout()<<" ";
-                else orxout()<<" ";
-                orxout()<<"]";
-            }
-            orxout()<<endl;
-        }
-
-    }
-
-    /**
-    @brief
-        Print levelcode_ (for Debugging only)
-    */
-    void MazeGenerator::levelOut(){
-        for ( int y = 0; y < numCells_; y++ )
-        {
-            for ( int x = 0; x < numCells_; x++ )
-            {
-                orxout()<<"[";
-                if ( levelcode_[ y * numCells_ + x ] < 2) orxout()<<"U";
-                else orxout()<<" ";
-                if ( levelcode_[ y * numCells_ + x ] % 2 == 0) orxout()<<"R";
-                else orxout()<<" ";
-
-                orxout()<<" ";
-                orxout()<<" ";
-                orxout()<<"]";
-            }
-            orxout()<<endl;
-        }
-    }
-
-    /**
-    @brief
-        Generate levelcode_ from Maze
-    */
-    void MazeGenerator::renderMaze()
-    {
-        for ( int y = 0; y < numCells_; y++ )
-        {
-            for ( int x = 0; x < numCells_; x++ )
-            {
-                char v = maze_[ y * numCells_ + x ];
-
-                if ( !( v & eDirection_Up    ) && y >0) levelcode_[ y * numCells_ + x ] |= 2;
-                if ( !( v & eDirection_Right ) && x <(numCells_-1)) levelcode_[ y * numCells_ + x ] |= 1;
-            }
-        }
-
-        // leave an empty space in the middle of the maze
-        int lowerBound = numCells_ / 2 - 2;
-        int upperBound = numCells_ / 2 + 2;
-        for ( int y = lowerBound; y < upperBound; y++ )
-        {
-            for ( int x = lowerBound; x < upperBound; x++ )
-            {
-
-                if(y == lowerBound && x != upperBound)
-                    levelcode_[ y * numCells_ + x ] &= 2;
-                else if (x == upperBound && y != lowerBound)
-                    levelcode_[ y * numCells_ + x ] &= 1;
-                else if(x != upperBound)
-                    levelcode_[ y * numCells_ + x ] = 0;
-            }
-        }
-
-    }
-
-    // return the current index in maze_
-    int MazeGenerator::cellIdx()
-    {
-        return ptX_ + numCells_ * ptY_;
-    }
-
-    int MazeGenerator::randomInt()
-    {
-        return (rand() % numCells_);
-    }
-
-    int MazeGenerator::randomInt4()
-    {
-        return (rand() % 4);
-    }
-}

Deleted: code/branches/Hover_FS18/src/modules/hover/MazeGenerator.h
===================================================================
--- code/branches/Hover_FS18/src/modules/hover/MazeGenerator.h	2018-04-26 13:22:59 UTC (rev 11908)
+++ code/branches/Hover_FS18/src/modules/hover/MazeGenerator.h	2018-04-26 13:50:24 UTC (rev 11909)
@@ -1,86 +0,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Master of Desaster:
- *      Manuel Meier
- *   Co-authors:
- *      Cyrill Burgener
- *
- */
-
-/**
-    @file MazeGenerator.h
-    @ingroup Hover
-*/
-
-#ifndef _MazeGenerator_H__
-#define _MazeGenerator_H__
-
-#include "HoverPrereqs.h"
-
-namespace orxonox
-{
-    enum eDirection
-    {
-        eDirection_Invalid = 0,
-        eDirection_Up      = 1,
-        eDirection_Right   = 2,
-        eDirection_Down    = 4,
-        eDirection_Left    = 8
-    }; 
-
-    class _HoverExport MazeGenerator
-    {
-        public:
-            MazeGenerator(int numCells);
-            ~MazeGenerator();
-
-            void generateMaze();
-            void renderMaze();
-            void mazeOut();
-            void levelOut();
-
-            int* getLevelcode() const
-                { return this->levelcode_; }
-
-        private:
-            bool isDirValid( eDirection Dir );
-            eDirection getDirection();
-
-            int cellIdx();
-            int randomInt();
-            int randomInt4();
-
-            int numCells_;
-            int* levelcode_;
-            unsigned char* maze_;
-
-            // current traversing position
-            int ptX_;
-            int ptY_;
-
-            int headingX_[9];
-            int headingY_[9];
-            int mask_[9];
-    };
-}
-
-#endif /* _MazeGenerator_H__ */



More information about the Orxonox-commit mailing list