[Orxonox-commit 7721] r12314 - in code/branches/OrxoBlox_FS19: data/levels src/modules/OrxoBlox

pomselj at orxonox.net pomselj at orxonox.net
Thu Apr 18 16:24:50 CEST 2019


Author: pomselj
Date: 2019-04-18 16:24:49 +0200 (Thu, 18 Apr 2019)
New Revision: 12314

Modified:
   code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h
Log:
some stuff, going home tbh

Modified: code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
===================================================================
--- code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw	2019-04-18 14:15:50 UTC (rev 12313)
+++ code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw	2019-04-18 14:24:49 UTC (rev 12314)
@@ -12,6 +12,15 @@
   include("templates/lodInformation.oxt")
 ?>
 
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipOrxoBlox.oxt")
+  include("templates/enemyInvader.oxt")
+  include("overlays/Asteroids2DHUD.oxo")
+  include("templates/asteroidsAsteroids2D.oxt")
+?>
+
 <Template name=OrxoBloxbatcameras defaults=0>
   <OrxoBloxBat>
     <camerapositions>

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc	2019-04-18 14:15:50 UTC (rev 12313)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc	2019-04-18 14:24:49 UTC (rev 12314)
@@ -51,6 +51,7 @@
 #include "OrxoBloxBot.h"//Remove??
 #include "OrxoBloxStones.h"
 #include "OrxoBloxWall.h"
+#include "OrxoBloxShip.h"
 
 
 namespace orxonox
@@ -189,23 +190,6 @@
 
     /**
     @brief
-        Spawns players, and fills the rest up with bots.
-    */
-    void OrxoBlox::spawnPlayersIfRequested()
-    {
-        // first spawn human players to assign always the left bat to the player in singleplayer
-        for (const auto& mapEntry : this->players_)
-            if (mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(mapEntry.first);
-        // now spawn bots
-        for (const auto& mapEntry : this->players_)
-            if (!mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
-                this->spawnPlayer(mapEntry.first);
-    }
-
-
-    /**
-    @brief
         Spawns the input player.
     @param player
         The player to be spawned.
@@ -221,11 +205,15 @@
         }
     }
 
-    /**
-    @brief
-        Is called when the player scored.
-    */
-    
+    OrxoBloxShip* OrxoBlox::getPlayer()
+    {
+        for (OrxoBloxShip* ship : ObjectList<OrxoBloxShip>())
+        {
+            return ship;
+        }
+        return nullptr;
+    }
+
     //void startWall(void);
     
 

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h	2019-04-18 14:15:50 UTC (rev 12313)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h	2019-04-18 14:24:49 UTC (rev 12314)
@@ -73,7 +73,7 @@
 
             virtual void spawnPlayer(PlayerInfo* player) override; //!< Spawns the input player.
 
-            
+            OrxoBloxShip* getPlayer();
 
             /**
             @brief Set the OrxoBloxCenterpoint (the playing field).
@@ -86,7 +86,6 @@
                 { return this->center_; }
 
         protected:
-            virtual void spawnPlayersIfRequested() override; //!< Spawns players, and fills the rest up with bots.
         private:
             void startWall(void);
             void createWall(void);

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h	2019-04-18 14:15:50 UTC (rev 12313)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h	2019-04-18 14:24:49 UTC (rev 12314)
@@ -73,6 +73,7 @@
     class OrxoBloxCenterpoint;
     class OrxoBloxWall;
     class OrxobloxStones;
+    class OrxoBloxShip;
 }
 
 #endif /* _OrxoBloxPrereqs_H__ */



More information about the Orxonox-commit mailing list