Changeset 6123 in orxonox.OLD for branches/objectmanager
- Timestamp:
- Dec 15, 2005, 2:14:53 AM (19 years ago)
- Location:
- branches/objectmanager/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/objectmanager/src/util/object_manager.cc
r6122 r6123 134 134 { 135 135 PRINT(0)(" +ObjectManager-LIST: '%s'-size='%d'-----\n", ObjectManager::OMListToString((OM_LIST)omList), this->objectLists[omList].size()); 136 if (level >1)136 // if (level >= 1) 137 137 { 138 138 std::list<WorldEntity*>::const_iterator entity; -
branches/objectmanager/src/world_entities/environment.cc
r5994 r6123 62 62 { 63 63 this->setClassID(CL_ENVIRONMENT, "Environment"); 64 this->toList(OM_ENVIRON); 64 65 } 65 66 -
branches/objectmanager/src/world_entities/power_ups/power_up.cc
r6121 r6123 28 28 this->setClassID(CL_POWER_UP, "PowerUp"); 29 29 this->toList(OM_COMMON); 30 31 30 } 32 31 -
branches/objectmanager/src/world_entities/weapons/bomb.cc
r5994 r6123 180 180 void Bomb::deactivate() 181 181 { 182 this->toList(OM_NULL); 182 183 State::getWorldEntityList()->remove(this); 183 184 this->lifeCycle = 0.0f; -
branches/objectmanager/src/world_entities/weapons/ground_turret.cc
r5994 r6123 89 89 { 90 90 this->left->setParent(this); 91 this->left->toList(this->getOMListNumber()); 91 92 this->left->setRelCoor(0,10,-5); 92 93 } … … 98 99 { 99 100 this->right->setParent(this); 101 this->right->toList(this->getOMListNumber()); 100 102 this->right->setRelCoor(0,10,5); 101 103 } -
branches/objectmanager/src/world_entities/weapons/guided_missile.cc
r6078 r6123 129 129 this->lifeCycle = 0.0; 130 130 131 this->toList(OM_NULL); 131 132 // GarbageCollector::getInstance()->collect(this); 132 133 State::getWorldEntityList()->remove(this); -
branches/objectmanager/src/world_entities/weapons/laser.cc
r6056 r6123 97 97 ParticleEngine::getInstance()->breakConnections(this->emitter); 98 98 this->lifeCycle = 0.0; 99 this->toList(OM_NULL); 99 100 100 // GarbageCollector::getInstance()->collect(this);101 101 State::getWorldEntityList()->remove(this); 102 102 this->removeNode(); -
branches/objectmanager/src/world_entities/weapons/rocket.cc
r6056 r6123 125 125 ParticleEngine::getInstance()->breakConnections(this->emitter); 126 126 this->lifeCycle = 0.0; 127 this->toList(OM_NULL); 127 128 128 129 // GarbageCollector::getInstance()->collect(this); -
branches/objectmanager/src/world_entities/weapons/test_bullet.cc
r5994 r6123 119 119 ParticleEngine::getInstance()->breakConnections(this->emitter); 120 120 this->lifeCycle = 0.0; 121 this->toList(OM_NULL); 121 122 122 123 // GarbageCollector::getInstance()->collect(this); -
branches/objectmanager/src/world_entities/weapons/weapon.cc
r6054 r6123 192 192 { 193 193 if (likely (this->projectileFactory != NULL)) 194 return dynamic_cast<Projectile*>(this->projectileFactory->resurrect()); 194 { 195 Projectile* pj = dynamic_cast<Projectile*>(this->projectileFactory->resurrect()); 196 pj->toList((OM_LIST)(this->getOMListNumber()+1)); 197 return pj; 198 } 195 199 else 196 200 { -
branches/objectmanager/src/world_entities/weapons/weapon_manager.cc
r6074 r6123 35 35 * @param number of weapon slots of the model/ship <= 8 (limitied) 36 36 */ 37 WeaponManager::WeaponManager( PNode* parent)37 WeaponManager::WeaponManager(WorldEntity* parent) 38 38 { 39 39 this->init(); … … 155 155 * a PNode. 156 156 */ 157 void WeaponManager::setParent(PNode* parent) 158 { 159 if (parent == NULL) 160 parent = PNode::getNullParent(); 157 void WeaponManager::setParent(WorldEntity* parent) 158 { 161 159 this->parent = parent; 162 160 if (this->parent != NULL) … … 246 244 //! @todo check if the weapon is already assigned to another config in another slot 247 245 this->configs[configID][slotID] = weapon; 246 weapon->toList(parent->getOMListNumber()); 248 247 if (this->parent != NULL) 249 weapon->setParent(parent);248 this->parent->addChild(weapon); 250 249 PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID); 251 250 } -
branches/objectmanager/src/world_entities/weapons/weapon_manager.h
r6055 r6123 45 45 46 46 public: 47 WeaponManager( PNode* parent);47 WeaponManager(WorldEntity* parent); 48 48 WeaponManager(const TiXmlElement* root); 49 49 ~WeaponManager(); … … 63 63 long getSlotCapability(int slot) const { return this->currentSlotConfig[slot].capability; }; 64 64 65 void setParent( PNode* parent);65 void setParent(WorldEntity* parent); 66 66 /** @returns the Parent (carrier) of this WeaponManager */ 67 67 PNode* getParent() const { return this->parent; }; … … 93 93 94 94 private: 95 PNode*parent; //!< The parent, this WeaponManager is connected to.95 WorldEntity* parent; //!< The parent, this WeaponManager is connected to. 96 96 97 97 int slotCount; //!< number of weapon slots the ship has.
Note: See TracChangeset
for help on using the changeset viewer.