Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2006, 5:01:38 PM (18 years ago)
Author:
patrick
Message:

found the bug, master-server proxy architecture is working correctly. yeaaa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/player_stats.cc

    r9564 r9574  
    4141  init();
    4242
    43   this->userId = userId;
     43  this->assignedUserId = userId;
    4444}
    4545
     
    5656  this->setClassID( CL_PLAYER_STATS, "PlayerStats" );
    5757
    58   this->userId = 0;
     58  this->assignedUserId = 0;
    5959  this->teamId = TEAM_NOTEAM;
    6060  this->preferedTeamId = TEAM_NOTEAM;
     
    6565  this->oldNickName = "Player";
    6666
    67   userId_handle = registerVarId( new SynchronizeableInt( &userId, &userId, "userId" ) );
     67  userId_handle = registerVarId( new SynchronizeableInt( &assignedUserId, &assignedUserId, "userId" ) );
    6868  teamId_handle = registerVarId( new SynchronizeableInt( &teamId, &teamId, "teamId" ) );
    6969  preferedTeamId_handle = registerVarId( new SynchronizeableInt( &preferedTeamId, &preferedTeamId, "preferedUserId" ) );
     
    9898    this->setPlayableUniqueId( this->playableUniqueId );
    9999
    100     PRINTF(0)("uniqueID changed %d %d %d\n", userId, SharedNetworkData::getInstance()->getHostID(), getUniqueID());
     100    PRINTF(0)("uniqueID changed %d %d %d\n", assignedUserId, SharedNetworkData::getInstance()->getHostID(), getUniqueID());
    101101  }
    102102
     
    110110  {
    111111    PRINTF(0)("user %s has changed team to %i\n", nickName.c_str(), this->teamId);
    112     this->oldNickName = nickName;
    113112  }
    114113}
     
    135134        it++ )
    136135  {
    137     if ( dynamic_cast<PlayerStats*>(*it)->
    138          getUserId() == userId )
     136
     137
     138    if ( dynamic_cast<PlayerStats*>(*it)->getAssignedUserId() == userId )
    139139    {
    140140      return dynamic_cast<PlayerStats*>(*it);
     
    150150void PlayerStats::setPlayableUniqueId( int uniqueId )
    151151{
     152  PRINTF(0)("set playable unique id %i\n", uniqueId);
    152153  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
    153154
     
    174175  }
    175176
    176   if ( this->playable && userId == SharedNetworkData::getInstance()
     177  if ( this->playable && this->assignedUserId == SharedNetworkData::getInstance()
    177178       ->getHostID() )
    178179  {
Note: See TracChangeset for help on using the changeset viewer.