Changeset 10578 for code/branches/core7/src/orxonox/Level.cc
- Timestamp:
- Sep 9, 2015, 4:10:21 PM (9 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.