Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6568 in orxonox.OLD for trunk


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

trunk: weaponManager is now reporting the change of Weapons to the (if a ) Playable

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

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

    r6547 r6568  
    5555
    5656  if (this->currentPlayer != NULL)
    57     this->currentPlayer->weaponConfigChanged();
     57    this->weaponConfigChanged();
    5858}
    5959
     
    6363
    6464  if (this->currentPlayer != NULL)
    65     this->currentPlayer->weaponConfigChanged();
     65    this->weaponConfigChanged();
    6666}
    6767
     
    7070  this->weaponMan->nextWeaponConfig();
    7171  if (this->currentPlayer != NULL)
    72     this->currentPlayer->weaponConfigChanged();
     72    this->weaponConfigChanged();
    7373}
    7474
     
    7777  this->weaponMan->previousWeaponConfig();
    7878  if (this->currentPlayer != NULL)
    79     this->currentPlayer->weaponConfigChanged();
    80 }
    81 
     79    this->weaponConfigChanged();
     80}
     81
     82void Playable::weaponConfigChanged()
     83{
     84  this->currentPlayer->weaponConfigChanged();
     85}
    8286
    8387/**
  • trunk/src/world_entities/playable.h

    r6547 r6568  
    3939
    4040    inline WeaponManager* getWeaponManager() const { return this->weaponMan; };
     41    void weaponConfigChanged();
     42
    4143
    4244    bool subscribePlayer(Player* player);
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6561 r6568  
    385385          tickWeapon->toList(this->parent->getOMListNumber());
    386386          this->currentSlotConfig[i].position.activateNode();
     387          if (this->parent->isA(CL_PLAYABLE))
     388          {
     389            dynamic_cast<Playable*>(this->parent)->weaponConfigChanged();
     390          }
    387391        }
    388392        else
Note: See TracChangeset for help on using the changeset viewer.