Changeset 5965 in orxonox.OLD for branches/powerups/src/world_entities/space_ships/space_ship.cc
- Timestamp:
- Dec 7, 2005, 3:45:26 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/world_entities/space_ships/space_ship.cc
r5955 r5965 17 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 18 18 19 #include "space_ship.h" 20 19 21 #include "executor/executor.h" 20 #include "space_ship.h"21 22 22 23 #include "objModel.h" … … 30 31 #include "factory.h" 31 32 #include "key_mapper.h" 33 34 #include "power_ups/weapon_power_up.h" 32 35 33 36 using namespace std; … … 368 371 } 369 372 373 /** 374 * 375 */ 376 bool SpaceShip::pickup(PowerUp* powerUp) 377 { 378 if(powerUp->isA(CL_WEAPON_POWER_UP)) { 379 WeaponPowerUp* wpu = dynamic_cast<WeaponPowerUp*>(powerUp); 380 WeaponManager* manager = this->getWeaponManager(); 381 int slot = manager->getNextFreeSlot(0, wpu->getCapsNeeded()); 382 if(slot >= 0) { 383 manager->addWeapon(wpu->getWeapon(), 0, slot); 384 return true; 385 } 386 } 387 else if(powerUp->isA(CL_SHIELD_POWER_UP)) { 388 389 } 390 return false; 391 } 392 370 393 #include "weapons/aiming_turret.h" 371 394 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
Note: See TracChangeset
for help on using the changeset viewer.