Changeset 6710 in orxonox.OLD for trunk/src/world_entities/power_ups/weapon_power_up.cc
- Timestamp:
- Jan 25, 2006, 4:18:12 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/power_ups/weapon_power_up.cc
r6695 r6710 53 53 this->setClassID(CL_WEAPON_POWER_UP, "WeaponPowerUp"); 54 54 this->weaponXML = NULL; 55 this->weaponID = CL_NULL; 55 56 this->weapon = NULL; 56 57 } … … 70 71 LoadParam(root, "weaponID", this, WeaponPowerUp, setWeaponClass); 71 72 } 72 this->model = this->weapon->getModel(0);73 73 } 74 74 … … 81 81 { 82 82 this->weapon = dynamic_cast<Weapon*>((weaponXML == NULL) 83 ? Factory::fabricate(static_cast<ClassID>(this->weapon->getClassID())) 84 : Factory::fabricate(weaponXML)); 83 ? Factory::fabricate(static_cast<ClassID>(weaponID)) 84 : Factory::fabricate((TiXmlElement*)this->getXmlElem()->FirstChildElement("weapon"))); 85 this->model = this->weapon->getModel(0); 85 86 } 86 87 … … 88 89 { 89 90 this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name)); 91 this->weaponID = (ClassID)this->weapon->getLeafClassID(); 92 this->model = this->weapon->getModel(0); 90 93 } 91 94
Note: See TracChangeset
for help on using the changeset viewer.