Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6578 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jan 18, 2006, 3:55:23 PM (19 years ago)
Author:
bensch
Message:

trunk: segfault prevention

File:
1 edited

Legend:

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

    r6568 r6578  
    5454  this->weaponMan->addWeapon(weapon, configID, slotID);
    5555
    56   if (this->currentPlayer != NULL)
     56  this->weaponConfigChanged();
     57}
     58
     59void Playable::removeWeapon(Weapon* weapon)
     60{
     61  this->weaponMan->removeWeapon(weapon);
     62
    5763    this->weaponConfigChanged();
    5864}
    5965
    60 void Playable::removeWeapon(Weapon* weapon)
    61 {
    62   this->weaponMan->removeWeapon(weapon);
    63 
    64   if (this->currentPlayer != NULL)
     66void Playable::nextWeaponConfig()
     67{
     68  this->weaponMan->nextWeaponConfig();
    6569    this->weaponConfigChanged();
    6670}
    6771
    68 void Playable::nextWeaponConfig()
    69 {
    70   this->weaponMan->nextWeaponConfig();
    71   if (this->currentPlayer != NULL)
     72void Playable::previousWeaponConfig()
     73{
     74  this->weaponMan->previousWeaponConfig();
    7275    this->weaponConfigChanged();
    7376}
    7477
    75 void Playable::previousWeaponConfig()
    76 {
    77   this->weaponMan->previousWeaponConfig();
    78   if (this->currentPlayer != NULL)
    79     this->weaponConfigChanged();
    80 }
    81 
    8278void Playable::weaponConfigChanged()
    8379{
    84   this->currentPlayer->weaponConfigChanged();
     80  if (this->currentPlayer != NULL)
     81    this->currentPlayer->weaponConfigChanged();
    8582}
    8683
Note: See TracChangeset for help on using the changeset viewer.