Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/world_entities/playable.cc


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r9656 r9869  
    3030#include "game_rules.h"
    3131
    32 #include "dot_emitter.h"
    33 #include "sprite_particles.h"
     32#include "particles/dot_emitter.h"
     33#include "particles/sprite_particles.h"
    3434
    3535#include "shared_network_data.h"
     
    4141SHELL_COMMAND_STATIC(orxoWeapon, Playable, Playable::addSomeWeapons_CHEAT)
    4242  ->setAlias("orxoWeapon");
    43 
     43ObjectListDefinition(Playable);
    4444
    4545Playable::Playable()
     
    4848    playmode(Playable::Full3D)
    4949{
    50   this->setClassID(CL_PLAYABLE, "Playable");
     50  this->registerObject(this, Playable::_objectList);
    5151  PRINTF(4)("PLAYABLE INIT\n");
    5252
     
    109109bool Playable::pickup(PowerUp* powerUp)
    110110{
    111   if(powerUp->isA(CL_WEAPON_POWER_UP))
    112   {
    113     return dynamic_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
    114   }
    115   else if(powerUp->isA(CL_PARAM_POWER_UP))
    116   {
    117     ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);
     111  /// FIXME TOTALLY
     112  if(powerUp->isA(WeaponPowerUp::staticClassID()))
     113  {
     114    return static_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
     115  }
     116  else if(powerUp->isA(ParamPowerUp::staticClassID()))
     117  {
     118    ParamPowerUp* ppu = static_cast<ParamPowerUp*>(powerUp);
    118119    switch(ppu->getType())
    119120    {
     
    213214    {
    214215      PRINTF(2)("ADDING WEAPONS - you cheater\n");
    215       playable->addWeapon(Weapon::createWeapon(CL_HYPERBLASTER));
    216       playable->addWeapon(Weapon::createWeapon(CL_TURRET));
    217       playable->addWeapon(Weapon::createWeapon(CL_AIMING_TURRET));
    218       playable->addWeapon(Weapon::createWeapon(CL_CANNON));
    219       playable->addWeapon(Weapon::createWeapon(CL_TARGETING_TURRET));
     216      playable->addWeapon(Weapon::createWeapon("Hyperblaster"));
     217      playable->addWeapon(Weapon::createWeapon("Turret"));
     218      playable->addWeapon(Weapon::createWeapon("AimingTurret"));
     219      playable->addWeapon(Weapon::createWeapon("Cannon"));
     220      playable->addWeapon(Weapon::createWeapon("TargetingTurret"));
    220221      PRINTF(2)("ADDING WEAPONS FINISHED\n");
    221222    }
Note: See TracChangeset for help on using the changeset viewer.