Changeset 6926 for code/branches/presentation3/src/libraries/core
- Timestamp:
- May 20, 2010, 10:23:22 AM (15 years ago)
- Location:
- code/branches/presentation3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3
- Property svn:mergeinfo changed
/code/branches/lod (added) merged: 6691,6724,6786-6787,6794,6828-6829,6838-6839,6843,6852,6877,6881,6909,6911
- Property svn:mergeinfo changed
-
code/branches/presentation3/src/libraries/core/BaseObject.cc
r6800 r6926 75 75 this->setScene(this->creator_->getScene(), this->creator_->getSceneID()); 76 76 this->setGametype(this->creator_->getGametype()); 77 this->setLevel(this->creator_->getLevel()); 77 78 } 78 79 else … … 83 84 this->sceneID_ = OBJECTID_UNKNOWN; 84 85 this->gametype_ = 0; 86 this->level_ = 0; 85 87 } 86 88 } -
code/branches/presentation3/src/libraries/core/BaseObject.h
r6800 r6926 51 51 class Scene; 52 52 class Gametype; 53 class Level; 53 54 54 55 //! The BaseObject is the parent of all classes representing an instance in the game. … … 153 154 inline Gametype* getOldGametype() const { return this->oldGametype_; } 154 155 virtual void changedGametype() {} 156 157 inline void setLevel(const SmartPtr<Level>& level) 158 { 159 if (level != this->level_) 160 { 161 this->level_ = level; 162 this->changedLevel(); 163 } 164 } 165 inline const SmartPtr<Level>& getLevel() const { return this->level_; } 166 virtual void changedLevel() {} 155 167 156 168 void addEventSource(BaseObject* source, const std::string& state); … … 209 221 SmartPtr<Gametype> gametype_; 210 222 Gametype* oldGametype_; 223 SmartPtr<Level> level_; 211 224 std::set<Template*> templates_; 212 225
Note: See TracChangeset
for help on using the changeset viewer.