Changeset 10571 for code/branches/core7/src
- Timestamp:
- Sep 9, 2015, 1:11:13 PM (9 years ago)
- Location:
- code/branches/core7/src
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/BaseObject.cc
r10358 r10571 78 78 { 79 79 this->setFile(this->creator_->getFile()); 80 this->setNamespace(this->creator_-> getNamespace());81 this->setScene(this->creator_-> getScene(), this->creator_->getSceneID());82 this->setGametype(this->creator_->g etGametype());83 this->setLevel(this->creator_-> getLevel());80 this->setNamespace(this->creator_->namespace_); 81 this->setScene(this->creator_->scene_, this->creator_->sceneID_); 82 this->setGametype(this->creator_->gametype_); 83 this->setLevel(this->creator_->level_); 84 84 } 85 85 else -
code/branches/core7/src/libraries/core/BaseObject.h
r10570 r10571 139 139 140 140 inline void setNamespace(const StrongPtr<Namespace>& ns) { this->namespace_ = ns; } 141 inline const StrongPtr<Namespace>&getNamespace() const { return this->namespace_; }141 inline Namespace* getNamespace() const { return this->namespace_; } 142 142 143 143 inline void setCreator(BaseObject* creator) { this->creator_ = creator; } … … 145 145 146 146 inline void setScene(const StrongPtr<Scene>& scene, uint32_t sceneID) { this->scene_ = scene; this->sceneID_=sceneID; } 147 inline const StrongPtr<Scene>&getScene() const { return this->scene_; }147 inline Scene* getScene() const { return this->scene_; } 148 148 inline virtual uint32_t getSceneID() const { return this->sceneID_; } 149 149 … … 157 157 } 158 158 } 159 inline const StrongPtr<Gametype>&getGametype() const { return this->gametype_; }159 inline Gametype* getGametype() const { return this->gametype_; } 160 160 inline Gametype* getOldGametype() const { return this->oldGametype_; } 161 161 virtual void changedGametype() {} 162 162 163 163 inline void setLevel(const StrongPtr<Level>& level) { this->level_ = level; } 164 inline const StrongPtr<Level>&getLevel() const { return this->level_; }164 inline Level* getLevel() const { return this->level_; } 165 165 166 166 void addEventSource(BaseObject* source, const std::string& state); -
code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc
r10232 r10571 66 66 if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace))) 67 67 { 68 DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype() .get());68 DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype()); 69 69 DodgeRaceGametype->setCenterpoint(this); 70 70 } -
code/branches/core7/src/modules/dodgerace/DodgeRaceHUDinfo.cc
r10236 r10571 82 82 if (this->getOwner() && this->getOwner()->getGametype()) 83 83 { 84 this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype() .get());84 this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype()); 85 85 } 86 86 else -
code/branches/core7/src/modules/gametypes/OldRaceCheckPoint.cc
r9667 r10571 61 61 SUPER(OldRaceCheckPoint, tick, dt); 62 62 63 OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype() .get());63 OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype()); 64 64 assert(gametype); 65 65 if (this->getCheckpointIndex() == gametype->getCheckpointsReached()) … … 82 82 DistanceTrigger::triggered(bIsTriggered); 83 83 84 OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype() .get());84 OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype()); 85 85 if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered) 86 86 { … … 107 107 if (this->bTimeLimit_ != 0) 108 108 { 109 OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype() .get());109 OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype()); 110 110 if (gametype) 111 111 { -
code/branches/core7/src/modules/gametypes/SpaceRaceManager.cc
r9667 r10571 46 46 { 47 47 RegisterObject(SpaceRaceManager); 48 this->race_ = orxonox_cast<SpaceRace*>(this->getGametype() .get());48 this->race_ = orxonox_cast<SpaceRace*>(this->getGametype()); 49 49 assert(race_); 50 50 //amountOfPlayers=(race_->getPlayers()).size(); … … 139 139 void SpaceRaceManager::checkpointReached(RaceCheckPoint* newCheckpoint, PlayerInfo* player) 140 140 { 141 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype() .get());141 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype()); 142 142 assert(gametype); 143 143 if (!gametype) -
code/branches/core7/src/modules/invader/InvaderCenterPoint.cc
r9943 r10571 66 66 if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader))) 67 67 { 68 Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype() .get());68 Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype()); 69 69 InvaderGametype->setCenterpoint(this); 70 70 } -
code/branches/core7/src/modules/invader/InvaderHUDinfo.cc
r9961 r10571 128 128 if (this->getOwner() && this->getOwner()->getGametype()) 129 129 { 130 this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype() .get());130 this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype()); 131 131 } 132 132 else -
code/branches/core7/src/modules/jump/JumpCenterpoint.cc
r10262 r10571 91 91 if (getGametype() != NULL && this->getGametype()->isA(Class(Jump))) 92 92 { 93 Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype() .get());93 Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype()); 94 94 jumpGametype->setCenterpoint(this); 95 95 } -
code/branches/core7/src/modules/jump/JumpScore.cc
r10262 r10571 119 119 if (this->getOwner() != NULL && this->getOwner()->getGametype()) 120 120 { 121 this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype() .get());121 this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype()); 122 122 } 123 123 else -
code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc
r10230 r10571 919 919 if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame))) 920 920 { 921 Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype() .get());921 Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype()); 922 922 Mini4DgameGametype->setGameboard(this); 923 923 } -
code/branches/core7/src/modules/objects/triggers/CheckPoint.cc
r9667 r10571 93 93 DistanceTrigger::triggered(bIsTriggered); 94 94 95 Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype() .get());95 Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype()); 96 96 if (gametype) 97 97 { -
code/branches/core7/src/modules/overlays/hud/LastManStandingInfos.cc
r9667 r10571 87 87 { 88 88 this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner()); 89 this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype() .get());89 this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype()); 90 90 } 91 91 else -
code/branches/core7/src/modules/overlays/hud/LastTeamStandingInfos.cc
r9667 r10571 87 87 { 88 88 this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner()); 89 this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype() .get());89 this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype()); 90 90 } 91 91 else -
code/branches/core7/src/modules/overlays/hud/TeamBaseMatchScore.cc
r9667 r10571 118 118 119 119 if (this->getOwner() && this->getOwner()->getGametype()) 120 this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype() .get());120 this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype()); 121 121 else 122 122 this->owner_ = 0; -
code/branches/core7/src/modules/pong/PongCenterpoint.cc
r9667 r10571 98 98 if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong))) 99 99 { 100 Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype() .get());100 Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype()); 101 101 pongGametype->setCenterpoint(this); 102 102 } -
code/branches/core7/src/modules/pong/PongScore.cc
r9939 r10571 170 170 171 171 if (this->getOwner() != NULL && this->getOwner()->getGametype()) 172 this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype() .get());172 this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype()); 173 173 else 174 174 this->owner_ = 0; -
code/branches/core7/src/modules/tetris/TetrisBrick.cc
r10262 r10571 169 169 if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris))) 170 170 { 171 Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype() .get());171 Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype()); 172 172 return tetrisGametype; 173 173 } -
code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc
r9667 r10571 98 98 if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris))) 99 99 { 100 Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype() .get());100 Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype()); 101 101 tetrisGametype->setCenterpoint(this); 102 102 } -
code/branches/core7/src/modules/tetris/TetrisScore.cc
r10262 r10571 118 118 119 119 if (this->getOwner() != NULL && this->getOwner()->getGametype()) 120 this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype() .get());120 this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype()); 121 121 else 122 122 this->owner_ = 0; -
code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9667 r10571 103 103 { 104 104 // 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 105 TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype() .get());105 TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype()); 106 106 towerDefenseGametype->setCenterpoint(this); 107 107 } -
code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc
r10557 r10571 29 29 this->setCollisionType(WorldEntity::Dynamic); 30 30 //needed to keep track of the PlayerStats coded in TowerDefense.h 31 this->td = orxonox_cast<TowerDefense*>(this->getGametype() .get());31 this->td = orxonox_cast<TowerDefense*>(this->getGametype()); 32 32 once_=false; 33 33 -
code/branches/core7/src/modules/towerdefense/TowerDefenseHUDController.cc
r10258 r10571 80 80 if (this->getOwner() && this->getOwner()->getGametype()) 81 81 { 82 this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype() .get());82 this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype()); 83 83 } 84 84 else -
code/branches/core7/src/orxonox/Scene.cc
r10570 r10571 63 63 64 64 this->setScene(StrongPtr<Scene>(this, false), this->getObjectID()); 65 65 66 this->bShadows_ = true; 66 67 this->bDebugDrawPhysics_ = false; -
code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
r10560 r10571 38 38 #include "core/command/ConsoleCommandIncludes.h" 39 39 #include "OrxonoxOverlay.h" 40 #include "gametypes/Gametype.h" 40 41 41 42 namespace orxonox -
code/branches/core7/src/orxonox/worldentities/pawns/Destroyer.cc
r9667 r10571 40 40 RegisterObject(Destroyer); 41 41 42 UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype() .get());42 UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype()); 43 43 if (gametype) 44 44 { -
code/branches/core7/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
r9667 r10571 45 45 this->state_ = BaseState::Uncontrolled; 46 46 47 TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype() .get());47 TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype()); 48 48 if (gametype) 49 49 { … … 58 58 this->fireEvent(); 59 59 60 TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype() .get());60 TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype()); 61 61 if (!gametype) 62 62 return;
Note: See TracChangeset
for help on using the changeset viewer.