Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7077 in orxonox.OLD for trunk/src/world_entities/power_ups


Ignore:
Timestamp:
Feb 7, 2006, 4:06:56 PM (19 years ago)
Author:
bensch
Message:

health

Location:
trunk/src/world_entities/power_ups
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/power_ups/power_up.cc

    r7066 r7077  
    144144    {
    145145      this->toList(OM_COMMON);
    146       this->soundSource.play(this->respawnBuffer);
     146      if (likely(this->respawnBuffer != NULL))
     147        this->soundSource.play(this->respawnBuffer);
    147148
    148149    }
  • trunk/src/world_entities/power_ups/power_up.h

    r7066 r7077  
    4040  PowerUp(float r, float g, float b);
    4141  virtual ~PowerUp ();
     42
     43protected:
    4244  Model* model;
    4345
  • trunk/src/world_entities/power_ups/weapon_power_up.cc

    r7065 r7077  
    3434{
    3535  this->init();
    36   this->loadPickupSound("sound/powerups/whats this2.wav");
    3736  if( root != NULL)
    3837    this->loadParams(root);
     
    4847{
    4948  this->setClassID(CL_WEAPON_POWER_UP, "WeaponPowerUp");
     49  this->loadPickupSound("sound/powerups/whats this2.wav");
     50
    5051  this->weaponXML = NULL;
    5152  this->weapon = NULL;
     
    9596{
    9697  this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name));
     98  if (this->weapon == NULL)
     99  {
     100    PRINTF(1)("Unable to load Weapon. %s\n", name);
     101    this->weapon = dynamic_cast<Weapon*>(Factory::fabricate("Turret"));
     102  }
    97103  this->model = this->weapon->getModel(0);
    98104}
Note: See TracChangeset for help on using the changeset viewer.