[Orxonox-commit 7762] r12354 - in code/branches/Boxhead_FS19: data/levels src/modules/hover

cwaupoti at orxonox.net cwaupoti at orxonox.net
Thu May 9 14:10:31 CEST 2019


Author: cwaupoti
Date: 2019-05-09 14:10:31 +0200 (Thu, 09 May 2019)
New Revision: 12354

Modified:
   code/branches/Boxhead_FS19/data/levels/Hover.oxw
   code/branches/Boxhead_FS19/src/modules/hover/Hover.cc
Log:
minor changes

Modified: code/branches/Boxhead_FS19/data/levels/Hover.oxw
===================================================================
--- code/branches/Boxhead_FS19/data/levels/Hover.oxw	2019-05-09 12:09:09 UTC (rev 12353)
+++ code/branches/Boxhead_FS19/data/levels/Hover.oxw	2019-05-09 12:10:31 UTC (rev 12354)
@@ -87,7 +87,7 @@
                                             <Template link=spaceshipzombie />
                                       </templates>
                                        <controller>
-                                          <WaypointPatrolController alertnessradius=2000 team=1 >
+                                          <WaypointPatrolController alertnessradius=2000 attackradius=1 team=1 >
                                              <waypoints>
                                               <Model mesh="cube.mesh" scale=0 position="15500,15500,15500" />
 
@@ -96,7 +96,8 @@
                                           </WaypointPatrolController>
 
                                        </controller>
-                                  </SpaceShip>
+    </SpaceShip>
+
     
   </Scene>
 </Level>

Modified: code/branches/Boxhead_FS19/src/modules/hover/Hover.cc
===================================================================
--- code/branches/Boxhead_FS19/src/modules/hover/Hover.cc	2019-05-09 12:09:09 UTC (rev 12353)
+++ code/branches/Boxhead_FS19/src/modules/hover/Hover.cc	2019-05-09 12:10:31 UTC (rev 12354)
@@ -35,7 +35,7 @@
 
 #include "HoverOrigin.h"
 #include "HoverWall.h"
-#include "HoverFlag.h"
+
 #include "MazeGenerator.h"
 #include "core/CoreIncludes.h"
     
@@ -50,7 +50,6 @@
         RegisterObject(Hover);
 
         this->origin_ = nullptr;
-        this->numberOfFlags_ = 1;
         this->firstTick_ = true;
 
         this->setHUDTemplate("HoverHUD");
@@ -96,22 +95,24 @@
             // }
 
             //Generate 5 flags randomly
-            for ( int i = 0; i < 5; i++ )
-            {
-                HoverFlag* flag = new HoverFlag(origin_->getContext());
-                flag->init(rand()%numCells, rand()%numCells, cellSize);
-                flags_.push_back(flag);
-            }
+            // for ( int i = 0; i < 5; i++ )
+            // {
+            //     HoverFlag* zombieship = new SpaceShip(origin_->getContext());
+            //     flag->init(rand()%numCells, rand()%numCells, cellSize);
+            //     flags_.push_back(flag);
+            // }
 
+
+
         }//firsttick end
 
         // Check if ship collided with one of the flags
-        for ( unsigned int i = 0; i < flags_.size(); i++ ){
-            if(flags_[i]->getCollided()){
-                flags_[i]->destroyLater();
-                flags_.erase (flags_.begin()+i);
-            }
-        }
-        numberOfFlags_ = flags_.size();
+        // for ( unsigned int i = 0; i < flags_.size(); i++ ){
+        //     if(flags_[i]->getCollided()){
+        //         flags_[i]->destroyLater();
+        //         flags_.erase (flags_.begin()+i);
+        //     }
+        // }
+        // numberOfFlags_ = flags_.size();
     }
 }



More information about the Orxonox-commit mailing list