Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 10, 2008, 12:05:03 AM (15 years ago)
Author:
landauf
Message:

merged revisions 2111-2170 from objecthierarchy branch back to trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/infos/PlayerInfo.cc

    r2087 r2171  
    4242        RegisterObject(PlayerInfo);
    4343
    44         this->clientID_ = network::CLIENTID_UNKNOWN;
     44        this->clientID_ = CLIENTID_UNKNOWN;
    4545        this->bHumanPlayer_ = false;
    4646        this->bLocalPlayer_ = false;
     
    4848        this->controller_ = 0;
    4949        this->controllableEntity_ = 0;
    50         this->controllableEntityID_ = network::CLIENTID_UNKNOWN;
     50        this->controllableEntityID_ = CLIENTID_UNKNOWN;
    5151
    5252        this->registerVariables();
     
    5555    PlayerInfo::~PlayerInfo()
    5656    {
    57         if (this->isInitialized())
     57        if (this->BaseObject::isInitialized())
    5858        {
    5959            this->stopControl(this->controllableEntity_);
     
    6969    void PlayerInfo::registerVariables()
    7070    {
    71         REGISTERSTRING(this->name_,                 network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
    72         REGISTERDATA  (this->controllableEntityID_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
    73         REGISTERDATA  (this->bReadyToSpawn_,        network::direction::toserver);
     71        REGISTERSTRING(this->name_,                 direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
     72        REGISTERDATA  (this->controllableEntityID_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
     73        REGISTERDATA  (this->bReadyToSpawn_,        direction::toserver);
    7474    }
    7575
    7676    void PlayerInfo::changedName()
    7777    {
    78         if (this->isReady() && this->getGametype())
     78        if (this->isInitialized() && this->getGametype())
    7979            this->getGametype()->playerChangedName(this);
    8080    }
     
    8282    void PlayerInfo::changedGametype()
    8383    {
    84         if (this->isReady())
     84        if (this->isInitialized())
    8585        {
    8686            if (this->getOldGametype())
     
    126126        else
    127127        {
    128             this->controllableEntityID_ = network::OBJECTID_UNKNOWN;
     128            this->controllableEntityID_ = OBJECTID_UNKNOWN;
    129129        }
    130130
     
    138138        {
    139139            this->controllableEntity_ = 0;
    140             this->controllableEntityID_ = network::OBJECTID_UNKNOWN;
     140            this->controllableEntityID_ = OBJECTID_UNKNOWN;
    141141
    142142            if (this->controller_)
     
    150150    void PlayerInfo::networkcallback_changedcontrollableentityID()
    151151    {
    152         if (this->controllableEntityID_ != network::OBJECTID_UNKNOWN)
     152        if (this->controllableEntityID_ != OBJECTID_UNKNOWN)
    153153        {
    154154            Synchronisable* temp = Synchronisable::getSynchronisable(this->controllableEntityID_);
Note: See TracChangeset for help on using the changeset viewer.