Changeset 6487 in orxonox.OLD for branches/powerups/src/world_entities/space_ships
- Timestamp:
- Jan 11, 2006, 4:18:14 PM (19 years ago)
- Location:
- branches/powerups/src/world_entities/space_ships
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/space_ships/space_ship.cc
r6444 r6487 452 452 } 453 453 454 /**455 *456 */457 bool SpaceShip::pickup(PowerUp* powerUp)458 {459 if(powerUp->isA(CL_WEAPON_POWER_UP)) {460 Weapon* weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon();461 WeaponManager* manager = this->getWeaponManager();462 int slot = manager->getNextFreeSlot(0, weapon->getCapability());463 if(slot >= 0) {464 manager->addWeapon(weapon, 0, slot);465 return true;466 }467 }468 else if(powerUp->isA(CL_PARAM_POWER_UP)) {469 ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);470 switch(ppu->getType()) {471 case PARAM_SHIELD:472 break;473 }474 }475 return false;476 }477 478 454 #include "weapons/aiming_turret.h" 479 455 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG -
branches/powerups/src/world_entities/space_ships/space_ship.h
r6443 r6487 15 15 class Event; 16 16 17 class SpaceShip : public Playable , public Extendable17 class SpaceShip : public Playable 18 18 { 19 19 … … 39 39 40 40 virtual void process(const Event &event); 41 bool pickup(PowerUp* powerUp);42 41 43 42 virtual int writeBytes(const byte* data, int length, int sender);
Note: See TracChangeset
for help on using the changeset viewer.