Changeset 9559 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 28, 2006, 12:23:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/player_stats.cc
r9542 r9559 84 84 */ 85 85 PlayerStats::~PlayerStats() 86 { 87 } 88 89 90 /** 91 * override this function to be notified on change 92 * of your registred variables. 93 * @param id id's which have changed 94 */ 86 {} 87 88 89 /** 90 * override this function to be notified on change 91 * of your registred variables. 92 * @param id id's which have changed 93 */ 95 94 void PlayerStats::varChangeHandler( std::list< int > & id ) 96 95 { … … 125 124 } 126 125 127 for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ ) 128 { 129 if ( dynamic_cast<PlayerStats*>(*it)->getUserId() == userId ) 126 for ( std::list<BaseObject*>::const_iterator it = list-> 127 begin(); 128 it != list->end(); 129 it++ ) 130 { 131 if ( dynamic_cast<PlayerStats*>(*it)-> 132 getUserId() == userId ) 130 133 { 131 134 return dynamic_cast<PlayerStats*>(*it); … … 150 153 151 154 this->playable = NULL; 152 for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ ) 153 { 154 if ( dynamic_cast<Playable*>(*it)->getUniqueID() == uniqueId ) 155 for ( std::list<BaseObject*>::const_iterator it = list-> 156 begin(); 157 it != list->end(); 158 it++ ) 159 { 160 if ( dynamic_cast<Playable*>(*it)-> 161 getUniqueID() == uniqueId ) 155 162 { 156 163 this->playable = dynamic_cast<Playable*>(*it); … … 161 168 } 162 169 163 if ( this->playable && userId == SharedNetworkData::getInstance()->getHostID() ) 170 if ( this->playable && userId == SharedNetworkData::getInstance() 171 ->getHostID() ) 164 172 { 165 173 State::getPlayer()->setPlayable( this->playable ); … … 212 220 } 213 221 222 /** 223 * handler for the nick name 224 * @param messageType type of the message 225 * @param data data of the message 226 * @param dataLength length of the data 227 * @param someData some additional data 228 * @param senderId userId of the sender 229 * @param destinationId userId of the rec 230 * @return true if handled correctly 231 */ 214 232 bool PlayerStats::changeNickHandler( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId ) 215 233 { … … 229 247 } 230 248 249 /** 250 * sets the nick name from the shell 251 * @param newNick new prefered nick name 252 */ 231 253 void PlayerStats::shellNick( const std::string& newNick ) 232 254 { … … 239 261 240 262 263 /** 264 * removes and delets all player stats 265 */ 241 266 void PlayerStats::deleteAllPlayerStats( ) 242 267 { … … 249 274 250 275 276 /** 277 * @return the score list of this player stat 278 */ 251 279 ScoreList PlayerStats::getScoreList( ) 252 280 { … … 260 288 } 261 289 262 for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ ) 290 for ( std::list<BaseObject*>::const_iterator it = list-> 291 begin(); 292 it != list->end(); 293 it++ ) 263 294 { 264 295 PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
Note: See TracChangeset
for help on using the changeset viewer.