[Orxonox-commit 5912] r10571 - in code/branches/core7/src: libraries/core modules/dodgerace modules/gametypes modules/invader modules/jump modules/mini4dgame modules/objects/triggers modules/overlays/hud modules/pong modules/tetris modules/towerdefense orxonox orxonox/overlays orxonox/worldentities/pawns

landauf at orxonox.net landauf at orxonox.net
Wed Sep 9 13:11:14 CEST 2015


Author: landauf
Date: 2015-09-09 13:11:13 +0200 (Wed, 09 Sep 2015)
New Revision: 10571

Modified:
   code/branches/core7/src/libraries/core/BaseObject.cc
   code/branches/core7/src/libraries/core/BaseObject.h
   code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc
   code/branches/core7/src/modules/dodgerace/DodgeRaceHUDinfo.cc
   code/branches/core7/src/modules/gametypes/OldRaceCheckPoint.cc
   code/branches/core7/src/modules/gametypes/SpaceRaceManager.cc
   code/branches/core7/src/modules/invader/InvaderCenterPoint.cc
   code/branches/core7/src/modules/invader/InvaderHUDinfo.cc
   code/branches/core7/src/modules/jump/JumpCenterpoint.cc
   code/branches/core7/src/modules/jump/JumpScore.cc
   code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc
   code/branches/core7/src/modules/objects/triggers/CheckPoint.cc
   code/branches/core7/src/modules/overlays/hud/LastManStandingInfos.cc
   code/branches/core7/src/modules/overlays/hud/LastTeamStandingInfos.cc
   code/branches/core7/src/modules/overlays/hud/TeamBaseMatchScore.cc
   code/branches/core7/src/modules/pong/PongCenterpoint.cc
   code/branches/core7/src/modules/pong/PongScore.cc
   code/branches/core7/src/modules/tetris/TetrisBrick.cc
   code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc
   code/branches/core7/src/modules/tetris/TetrisScore.cc
   code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc
   code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc
   code/branches/core7/src/modules/towerdefense/TowerDefenseHUDController.cc
   code/branches/core7/src/orxonox/Scene.cc
   code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
   code/branches/core7/src/orxonox/worldentities/pawns/Destroyer.cc
   code/branches/core7/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
Log:
BaseObject returns plain pointers instead of StrongPtrs for Namespace, Level, Scene, and Gametype.

Modified: code/branches/core7/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/core7/src/libraries/core/BaseObject.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/libraries/core/BaseObject.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -77,10 +77,10 @@
         if (this->creator_)
         {
             this->setFile(this->creator_->getFile());
-            this->setNamespace(this->creator_->getNamespace());
-            this->setScene(this->creator_->getScene(), this->creator_->getSceneID());
-            this->setGametype(this->creator_->getGametype());
-            this->setLevel(this->creator_->getLevel());
+            this->setNamespace(this->creator_->namespace_);
+            this->setScene(this->creator_->scene_, this->creator_->sceneID_);
+            this->setGametype(this->creator_->gametype_);
+            this->setLevel(this->creator_->level_);
         }
         else
         {

Modified: code/branches/core7/src/libraries/core/BaseObject.h
===================================================================
--- code/branches/core7/src/libraries/core/BaseObject.h	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/libraries/core/BaseObject.h	2015-09-09 11:11:13 UTC (rev 10571)
@@ -138,13 +138,13 @@
                 { return this->templates_; }
 
             inline void setNamespace(const StrongPtr<Namespace>& ns) { this->namespace_ = ns; }
-            inline const StrongPtr<Namespace>& getNamespace() const { return this->namespace_; }
+            inline Namespace* getNamespace() const { return this->namespace_; }
 
             inline void setCreator(BaseObject* creator) { this->creator_ = creator; }
             inline BaseObject* getCreator() const { return this->creator_; }
 
             inline void setScene(const StrongPtr<Scene>& scene, uint32_t sceneID) { this->scene_ = scene; this->sceneID_=sceneID; }
-            inline const StrongPtr<Scene>& getScene() const { return this->scene_; }
+            inline Scene* getScene() const { return this->scene_; }
             inline virtual uint32_t getSceneID() const { return this->sceneID_; }
 
             inline void setGametype(const StrongPtr<Gametype>& gametype)
@@ -156,12 +156,12 @@
                     this->changedGametype();
                 }
             }
-            inline const StrongPtr<Gametype>& getGametype() const { return this->gametype_; }
+            inline Gametype* getGametype() const { return this->gametype_; }
             inline Gametype* getOldGametype() const { return this->oldGametype_; }
             virtual void changedGametype() {}
 
             inline void setLevel(const StrongPtr<Level>& level) { this->level_ = level; }
-            inline const StrongPtr<Level>& getLevel() const { return this->level_; }
+            inline Level* getLevel() const { return this->level_; }
 
             void addEventSource(BaseObject* source, const std::string& state);
             void removeEventSource(BaseObject* source);

Modified: code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc
===================================================================
--- code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -65,7 +65,7 @@
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
         {
-            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype().get());
+            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
             DodgeRaceGametype->setCenterpoint(this);
         }
     }

Modified: code/branches/core7/src/modules/dodgerace/DodgeRaceHUDinfo.cc
===================================================================
--- code/branches/core7/src/modules/dodgerace/DodgeRaceHUDinfo.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/dodgerace/DodgeRaceHUDinfo.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -81,7 +81,7 @@
 
         if (this->getOwner() && this->getOwner()->getGametype())
         {
-            this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype().get());
+            this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());
         }
         else
         {

Modified: code/branches/core7/src/modules/gametypes/OldRaceCheckPoint.cc
===================================================================
--- code/branches/core7/src/modules/gametypes/OldRaceCheckPoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/gametypes/OldRaceCheckPoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -60,7 +60,7 @@
     {
         SUPER(OldRaceCheckPoint, tick, dt);
 
-        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
+        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
         assert(gametype);
         if (this->getCheckpointIndex() == gametype->getCheckpointsReached())
             this->setRadarVisibility(true);
@@ -81,7 +81,7 @@
     {
         DistanceTrigger::triggered(bIsTriggered);
 
-        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
+        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
         if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered)
         {
             gametype->clock_.capture();
@@ -106,7 +106,7 @@
         this->bTimeLimit_ = timeLimit;
         if (this->bTimeLimit_ != 0)
         {
-            OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
+            OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
             if (gametype)
             {
                 const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)

Modified: code/branches/core7/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/core7/src/modules/gametypes/SpaceRaceManager.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/gametypes/SpaceRaceManager.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -45,7 +45,7 @@
         BaseObject(context)
     {
         RegisterObject(SpaceRaceManager);
-        this->race_ = orxonox_cast<SpaceRace*>(this->getGametype().get());
+        this->race_ = orxonox_cast<SpaceRace*>(this->getGametype());
         assert(race_);
         //amountOfPlayers=(race_->getPlayers()).size();
         this->firstcheckpointvisible_ = false;
@@ -138,7 +138,7 @@
 
     void SpaceRaceManager::checkpointReached(RaceCheckPoint* newCheckpoint, PlayerInfo* player)
     {
-        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
+        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype());
         assert(gametype);
         if (!gametype)
         return;

Modified: code/branches/core7/src/modules/invader/InvaderCenterPoint.cc
===================================================================
--- code/branches/core7/src/modules/invader/InvaderCenterPoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/invader/InvaderCenterPoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -65,7 +65,7 @@
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
         {
-            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype().get());
+            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
             InvaderGametype->setCenterpoint(this);
         }
     }

Modified: code/branches/core7/src/modules/invader/InvaderHUDinfo.cc
===================================================================
--- code/branches/core7/src/modules/invader/InvaderHUDinfo.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/invader/InvaderHUDinfo.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -127,7 +127,7 @@
 
         if (this->getOwner() && this->getOwner()->getGametype())
         {
-            this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype().get());
+            this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype());
         }
         else
         {

Modified: code/branches/core7/src/modules/jump/JumpCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/jump/JumpCenterpoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/jump/JumpCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -90,7 +90,7 @@
     {
         if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
         {
-            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
+            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype());
             jumpGametype->setCenterpoint(this);
         }
     }

Modified: code/branches/core7/src/modules/jump/JumpScore.cc
===================================================================
--- code/branches/core7/src/modules/jump/JumpScore.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/jump/JumpScore.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -118,7 +118,7 @@
 
         if (this->getOwner() != NULL && this->getOwner()->getGametype())
         {
-            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype().get());
+            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype());
         }
         else
         {

Modified: code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc
===================================================================
--- code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -918,7 +918,7 @@
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame)))
         {
-            Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype().get());
+            Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype());
             Mini4DgameGametype->setGameboard(this);
         }
     }

Modified: code/branches/core7/src/modules/objects/triggers/CheckPoint.cc
===================================================================
--- code/branches/core7/src/modules/objects/triggers/CheckPoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/objects/triggers/CheckPoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -92,7 +92,7 @@
     {
         DistanceTrigger::triggered(bIsTriggered);
 
-        Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype().get());
+        Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype());
         if (gametype)
         {
             gametype->addTime(addTime_);

Modified: code/branches/core7/src/modules/overlays/hud/LastManStandingInfos.cc
===================================================================
--- code/branches/core7/src/modules/overlays/hud/LastManStandingInfos.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/overlays/hud/LastManStandingInfos.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -86,7 +86,7 @@
         if (this->getOwner() && this->getOwner()->getGametype())
         {
             this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner());
-            this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype().get());
+            this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype());
         }
         else
         {

Modified: code/branches/core7/src/modules/overlays/hud/LastTeamStandingInfos.cc
===================================================================
--- code/branches/core7/src/modules/overlays/hud/LastTeamStandingInfos.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/overlays/hud/LastTeamStandingInfos.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -86,7 +86,7 @@
         if (this->getOwner() && this->getOwner()->getGametype())
         {
             this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner());
-            this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype().get());
+            this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype());
         }
         else
         {

Modified: code/branches/core7/src/modules/overlays/hud/TeamBaseMatchScore.cc
===================================================================
--- code/branches/core7/src/modules/overlays/hud/TeamBaseMatchScore.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/overlays/hud/TeamBaseMatchScore.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -117,7 +117,7 @@
         SUPER(TeamBaseMatchScore, changedOwner);
 
         if (this->getOwner() && this->getOwner()->getGametype())
-            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype().get());
+            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
         else
             this->owner_ = 0;
     }

Modified: code/branches/core7/src/modules/pong/PongCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/pong/PongCenterpoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/pong/PongCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -97,7 +97,7 @@
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
         {
-            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype().get());
+            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype());
             pongGametype->setCenterpoint(this);
         }
     }

Modified: code/branches/core7/src/modules/pong/PongScore.cc
===================================================================
--- code/branches/core7/src/modules/pong/PongScore.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/pong/PongScore.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -169,7 +169,7 @@
         SUPER(PongScore, changedOwner);
 
         if (this->getOwner() != NULL && this->getOwner()->getGametype())
-            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
+            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
         else
             this->owner_ = 0;
     }

Modified: code/branches/core7/src/modules/tetris/TetrisBrick.cc
===================================================================
--- code/branches/core7/src/modules/tetris/TetrisBrick.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/tetris/TetrisBrick.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -168,7 +168,7 @@
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
         {
-            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
+            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
             return tetrisGametype;
         }
         return NULL;

Modified: code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -97,7 +97,7 @@
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
         {
-            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
+            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
             tetrisGametype->setCenterpoint(this);
         }
     }

Modified: code/branches/core7/src/modules/tetris/TetrisScore.cc
===================================================================
--- code/branches/core7/src/modules/tetris/TetrisScore.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/tetris/TetrisScore.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -117,7 +117,7 @@
         SUPER(TetrisScore, changedOwner);
 
         if (this->getOwner() != NULL && this->getOwner()->getGametype())
-            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype().get());
+            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
         else
             this->owner_ = 0;
     }

Modified: code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -102,7 +102,7 @@
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
         {
             // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
-            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
+            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype());
             towerDefenseGametype->setCenterpoint(this);
         }
     }

Modified: code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -28,7 +28,7 @@
 
         this->setCollisionType(WorldEntity::Dynamic);
         //needed to keep track of the PlayerStats coded in TowerDefense.h
-        this->td = orxonox_cast<TowerDefense*>(this->getGametype().get());
+        this->td = orxonox_cast<TowerDefense*>(this->getGametype());
         once_=false;
 
     }

Modified: code/branches/core7/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/branches/core7/src/modules/towerdefense/TowerDefenseHUDController.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/modules/towerdefense/TowerDefenseHUDController.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -79,7 +79,7 @@
 
             if (this->getOwner() && this->getOwner()->getGametype())
                     {
-                        this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype().get());
+                        this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype());
                     }
                     else
                     {

Modified: code/branches/core7/src/orxonox/Scene.cc
===================================================================
--- code/branches/core7/src/orxonox/Scene.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/orxonox/Scene.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -62,6 +62,7 @@
         RegisterObject(Scene);
 
         this->setScene(StrongPtr<Scene>(this, false), this->getObjectID());
+
         this->bShadows_ = true;
         this->bDebugDrawPhysics_ = false;
         this->debugDrawer_ = NULL;

Modified: code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/branches/core7/src/orxonox/overlays/OverlayGroup.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/orxonox/overlays/OverlayGroup.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -37,6 +37,7 @@
 #include "core/XMLPort.h"
 #include "core/command/ConsoleCommandIncludes.h"
 #include "OrxonoxOverlay.h"
+#include "gametypes/Gametype.h"
 
 namespace orxonox
 {

Modified: code/branches/core7/src/orxonox/worldentities/pawns/Destroyer.cc
===================================================================
--- code/branches/core7/src/orxonox/worldentities/pawns/Destroyer.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/orxonox/worldentities/pawns/Destroyer.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -39,7 +39,7 @@
     {
         RegisterObject(Destroyer);
 
-        UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype().get());
+        UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype());
         if (gametype)
         {
             gametype->addDestroyer(this);

Modified: code/branches/core7/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- code/branches/core7/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	2015-09-08 20:47:36 UTC (rev 10570)
+++ code/branches/core7/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	2015-09-09 11:11:13 UTC (rev 10571)
@@ -44,7 +44,7 @@
 
         this->state_ = BaseState::Uncontrolled;
 
-        TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype().get());
+        TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype());
         if (gametype)
         {
             gametype->addBase(this);
@@ -57,7 +57,7 @@
     {
         this->fireEvent();
 
-        TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype().get());
+        TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype());
         if (!gametype)
             return;
 




More information about the Orxonox-commit mailing list