Changeset 6501 for code/trunk/src/orxonox
- Timestamp:
- Mar 11, 2010, 11:32:01 AM (15 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/LevelManager.cc
r6417 r6501 132 132 void LevelManager::compileAvailableLevelList() 133 133 { 134 availableLevels_ = *Resource::findResourceNames("*.oxw");135 for (std::vector<std::string>::iterator it = availableLevels_.begin(); it != availableLevels_.end();)136 if (it->find("old/") == 0)137 it = availableLevels_.erase(it);138 else134 this->availableLevels_.clear(); 135 Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw"); 136 for (Ogre::StringVector::const_iterator it = levels->begin(); it != levels->end(); ++it) 137 { 138 if (it->find("old/") != 0) 139 139 { 140 140 size_t pos = it->find(".oxw"); 141 *it = it->substr(0, pos); 142 ++it; 141 this->availableLevels_.push_back(it->substr(0, pos)); 143 142 } 143 } 144 144 } 145 145 } -
code/trunk/src/orxonox/controllers/NewHumanController.cc
r6417 r6501 366 366 { 367 367 // Try to cast the user pointer 368 WorldEntity* wePtr = dynamic_cast<WorldEntity*>( itr->movable->getUserObject());368 WorldEntity* wePtr = dynamic_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny())); 369 369 if (wePtr) 370 370 { -
code/trunk/src/orxonox/graphics/Camera.cc
r6417 r6501 62 62 63 63 this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString()); 64 this->camera_->setUserObject(this);64 static_cast<Ogre::MovableObject*>(this->camera_)->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this))); 65 65 this->cameraNode_ = this->getScene()->getRootSceneNode()->createChildSceneNode(); 66 66 this->attachNode(this->cameraNode_); -
code/trunk/src/orxonox/worldentities/WorldEntity.cc
r6417 r6501 474 474 { 475 475 this->node_->attachObject(object); 476 object->setUser Object(this);476 object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this))); 477 477 } 478 478 … … 489 489 void WorldEntity::detachOgreObject(Ogre::MovableObject* object) 490 490 { 491 object->setUser Object(NULL);491 object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(NULL))); 492 492 this->node_->detachObject(object); 493 493 } -
code/trunk/src/orxonox/worldentities/WorldEntity.h
r6417 r6501 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include <OgreUserDefinedObject.h>36 35 #ifdef ORXONOX_RELEASE 37 36 # include <OgreSceneNode.h> … … 70 69 Collision shapes: These are controlled by the internal WorldEntityCollisionShape. @see WorldEntityCollisionShape. 71 70 */ 72 class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable, public btMotionState , public Ogre::UserDefinedObject71 class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable, public btMotionState 73 72 { 74 73 friend class Scene;
Note: See TracChangeset
for help on using the changeset viewer.