Changeset 6123 in orxonox.OLD for branches/objectmanager/src/world_entities/weapons/weapon_manager.cc
- Timestamp:
- Dec 15, 2005, 2:14:53 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.