Changeset 10578 for code/branches/core7/src/orxonox
- Timestamp:
- Sep 9, 2015, 4:10:21 PM (9 years ago)
- Location:
- code/branches/core7/src/orxonox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/orxonox/Level.cc
r10576 r10578 49 49 RegisterObject(Level); 50 50 51 this->setLevel( StrongPtr<Level>(this, false));51 this->setLevel(WeakPtr<Level>(this)); // store a weak-pointer to itself (a strong-pointer would create a recursive dependency) 52 52 53 53 this->registerVariables(); … … 123 123 Gametype* rootgametype = orxonox_cast<Gametype*>(identifier->fabricate(this)); 124 124 125 rootgametype->setLevel( NULL); // avoid circular references126 this->setGametype( rootgametype);125 rootgametype->setLevel(StrongPtr<Level>(NULL)); // avoid circular references 126 this->setGametype(StrongPtr<Gametype>(rootgametype)); 127 127 rootgametype->init(); // call init() AFTER the gametype was set 128 128 -
code/branches/core7/src/orxonox/Scene.cc
r10571 r10578 62 62 RegisterObject(Scene); 63 63 64 this->setScene( StrongPtr<Scene>(this, false), this->getObjectID());64 this->setScene(WeakPtr<Scene>(this), this->getObjectID()); // store a weak-pointer to itself (a strong-pointer would create a recursive dependency) 65 65 66 66 this->bShadows_ = true; -
code/branches/core7/src/orxonox/gametypes/Gametype.cc
r10575 r10578 61 61 RegisterObject(Gametype); 62 62 63 this->setGametype( StrongPtr<Gametype>(this, false));63 this->setGametype(WeakPtr<Gametype>(this)); // store a weak-pointer to itself (a strong-pointer would create a recursive dependency) 64 64 65 65 this->gtinfo_ = new GametypeInfo(context); -
code/branches/core7/src/orxonox/infos/PlayerInfo.cc
r10576 r10578 98 98 { 99 99 Gametype* oldGametype = this->getGametype(); 100 this->setGametype( gametype);100 this->setGametype(StrongPtr<Gametype>(gametype)); 101 101 Gametype* newGametype = this->getGametype(); 102 102
Note: See TracChangeset
for help on using the changeset viewer.