Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2005, 5:02:50 PM (19 years ago)
Author:
manuel
Message:

needs fix in weapon_powert_up.cc (fabricate from string)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/world_entities/space_ships/space_ship.cc

    r5965 r5973  
    377377{
    378378  if(powerUp->isA(CL_WEAPON_POWER_UP)) {
    379     WeaponPowerUp* wpu = dynamic_cast<WeaponPowerUp*>(powerUp);
     379    Weapon weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon();
    380380    WeaponManager* manager = this->getWeaponManager();
    381     int slot = manager->getNextFreeSlot(0, wpu->getCapsNeeded());
     381    int slot = manager->getNextFreeSlot(0, weapon->getCapability());
    382382    if(slot >= 0) {
    383       manager->addWeapon(wpu->getWeapon(), 0, slot);
     383      manager->addWeapon(weapon, 0, slot);
    384384      return true;
    385385    }
Note: See TracChangeset for help on using the changeset viewer.