Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Apr 19, 2006, 12:24:20 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: simple useless stuff

File:
1 edited

Legend:

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

    r7193 r7337  
    3939
    4040Playable::Playable()
     41  : weaponMan(this)
    4142{
    4243  this->setClassID(CL_PLAYABLE, "Playable");
     
    4445
    4546  this->toList(OM_GROUP_01);
    46   this->weaponMan = new WeaponManager(this);
    4747
    4848  // the reference to the Current Player is NULL, because we dont have one at the beginning.
     
    6464Playable::~Playable()
    6565{
    66   delete this->weaponMan;
    67 
    6866  // THE DERIVED CLASS MUST UNSUBSCRIBE THE PLAYER THROUGH
    6967  // this->setPlayer(NULL);
     
    7775  WorldEntity::loadParams(root);
    7876
    79   LoadParam(root, "abs-dir", this, Playable, setAbsDirPlay);
     77  LoadParam(root, "abs-dir", this, Playable, setStartDirection);
    8078}
    8179
    8280void Playable::addWeapon(Weapon* weapon, int configID, int slotID)
    8381{
    84   this->weaponMan->addWeapon(weapon, configID, slotID);
     82  this->weaponMan.addWeapon(weapon, configID, slotID);
    8583
    8684  this->weaponConfigChanged();
     
    9088void Playable::removeWeapon(Weapon* weapon)
    9189{
    92   this->weaponMan->removeWeapon(weapon);
     90  this->weaponMan.removeWeapon(weapon);
    9391
    9492    this->weaponConfigChanged();
     
    9896void Playable::nextWeaponConfig()
    9997{
    100   this->weaponMan->nextWeaponConfig();
     98  this->weaponMan.nextWeaponConfig();
    10199    this->weaponConfigChanged();
    102100}
     
    105103void Playable::previousWeaponConfig()
    106104{
    107   this->weaponMan->previousWeaponConfig();
     105  this->weaponMan.previousWeaponConfig();
    108106    this->weaponConfigChanged();
    109107}
     
    259257{
    260258  if(powerUp->isA(CL_WEAPON_POWER_UP)) {
    261     return dynamic_cast<WeaponPowerUp*>(powerUp)->process(this->getWeaponManager());
     259    return dynamic_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
    262260  }
    263261  else if(powerUp->isA(CL_PARAM_POWER_UP)) {
     
    305303void Playable::tick(float dt)
    306304{
    307   this->weaponMan->tick(dt);
     305  this->weaponMan.tick(dt);
    308306  if (this->bFire)
    309     weaponMan->fire();
     307    weaponMan.fire();
    310308}
    311309
Note: See TracChangeset for help on using the changeset viewer.