Changeset 9574 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 28, 2006, 5:01:38 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.cc
r9571 r9574 538 538 } 539 539 540 PRINT F(0)("Current number of connections is: %i\n", this->peers.size());540 PRINT(0)(" Current number of connections is: %i\n", this->peers.size()); 541 541 for ( PeerList::iterator it = peers.begin(); it != peers.end(); it++ ) 542 542 { 543 PRINTF(0)("peers[%i] with uniqueId %i and address: %s\n", it->first, it->second.userId, it->second.ip.ipString().c_str()); 544 } 543 PRINT(0)(" peers[%i] with uniqueId %i and address: %s\n", it->first, it->second.userId, it->second.ip.ipString().c_str()); 544 } 545 PRINT(0)("\n\n"); 545 546 546 547 -
branches/proxy/src/lib/network/player_stats.cc
r9564 r9574 41 41 init(); 42 42 43 this-> userId = userId;43 this->assignedUserId = userId; 44 44 } 45 45 … … 56 56 this->setClassID( CL_PLAYER_STATS, "PlayerStats" ); 57 57 58 this-> userId = 0;58 this->assignedUserId = 0; 59 59 this->teamId = TEAM_NOTEAM; 60 60 this->preferedTeamId = TEAM_NOTEAM; … … 65 65 this->oldNickName = "Player"; 66 66 67 userId_handle = registerVarId( new SynchronizeableInt( & userId, &userId, "userId" ) );67 userId_handle = registerVarId( new SynchronizeableInt( &assignedUserId, &assignedUserId, "userId" ) ); 68 68 teamId_handle = registerVarId( new SynchronizeableInt( &teamId, &teamId, "teamId" ) ); 69 69 preferedTeamId_handle = registerVarId( new SynchronizeableInt( &preferedTeamId, &preferedTeamId, "preferedUserId" ) ); … … 98 98 this->setPlayableUniqueId( this->playableUniqueId ); 99 99 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()); 101 101 } 102 102 … … 110 110 { 111 111 PRINTF(0)("user %s has changed team to %i\n", nickName.c_str(), this->teamId); 112 this->oldNickName = nickName;113 112 } 114 113 } … … 135 134 it++ ) 136 135 { 137 if ( dynamic_cast<PlayerStats*>(*it)-> 138 getUserId() == userId ) 136 137 138 if ( dynamic_cast<PlayerStats*>(*it)->getAssignedUserId() == userId ) 139 139 { 140 140 return dynamic_cast<PlayerStats*>(*it); … … 150 150 void PlayerStats::setPlayableUniqueId( int uniqueId ) 151 151 { 152 PRINTF(0)("set playable unique id %i\n", uniqueId); 152 153 const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE ); 153 154 … … 174 175 } 175 176 176 if ( this->playable && userId == SharedNetworkData::getInstance()177 if ( this->playable && this->assignedUserId == SharedNetworkData::getInstance() 177 178 ->getHostID() ) 178 179 { -
branches/proxy/src/lib/network/player_stats.h
r9521 r9574 41 41 42 42 static PlayerStats * getStats( int userId ); 43 inline int getAssignedUserId(){ return this->assignedUserId; } 43 44 44 inline int getUserId(){ return userId; }45 45 46 46 inline int getTeamId(){ return teamId; } … … 89 89 int nickName_handler; 90 90 91 int userId;//!< userId91 int assignedUserId; //!< userId 92 92 int teamId; //!< teamId 93 93 int preferedTeamId; //!< preferedTeamId
Note: See TracChangeset
for help on using the changeset viewer.