Changeset 5973 in orxonox.OLD for branches/powerups/src/world_entities/space_ships
- Timestamp:
- Dec 7, 2005, 5:02:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/space_ships/space_ship.cc
r5965 r5973 377 377 { 378 378 if(powerUp->isA(CL_WEAPON_POWER_UP)) { 379 Weapon PowerUp* wpu = dynamic_cast<WeaponPowerUp*>(powerUp);379 Weapon weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon(); 380 380 WeaponManager* manager = this->getWeaponManager(); 381 int slot = manager->getNextFreeSlot(0, w pu->getCapsNeeded());381 int slot = manager->getNextFreeSlot(0, weapon->getCapability()); 382 382 if(slot >= 0) { 383 manager->addWeapon(w pu->getWeapon(), 0, slot);383 manager->addWeapon(weapon, 0, slot); 384 384 return true; 385 385 }
Note: See TracChangeset
for help on using the changeset viewer.