Changeset 9116 in orxonox.OLD
- Timestamp:
- Jul 4, 2006, 1:09:37 PM (18 years ago)
- Location:
- branches/presentation/src/lib/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/network/handshake.cc
r8362 r9116 43 43 44 44 candel_id = registerVarId( new SynchronizeableInt( &localState.canDel, &remoteState.canDel, "canDel", PERMISSION_ALL ) ); 45 46 registerVar( new SynchronizeableString( &localState.preferedNickName, &remoteState.preferedNickName, "preferedNickName", PERMISSION_ALL ) ); 45 47 46 48 localState.completed = 0; -
branches/presentation/src/lib/network/handshake.h
r7954 r9116 28 28 29 29 std::string errorString; 30 31 //additional data 32 std::string preferedNickName; 30 33 }; 31 34 … … 43 46 inline bool allowDel(){ return localState.canDel == 1; } 44 47 inline void del(){ localState.canDel = 1; } 48 49 inline void setPreferedNickName( const std::string & nick ){ localState.preferedNickName = nick; } 50 inline std::string getPreferedNickName(){ return remoteState.preferedNickName; } 45 51 46 52 virtual void varChangeHandler( std::list<int> & id ); -
branches/presentation/src/lib/network/network_game_manager.cc
r9110 r9116 41 41 42 42 #include "multiplayer_team_deathmatch.h" 43 44 #include "preferences.h" 43 45 44 46 … … 125 127 stats->setPlayableUniqueId( playable.getUniqueID() ); 126 128 stats->setModelFileName( playableModel ); 129 130 if ( userId == 0 ) 131 stats->setNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Server" ) ); 127 132 128 133 if ( rules.isA( CL_MULTIPLAYER_TEAM_DEATHMATCH ) ) -
branches/presentation/src/lib/network/network_stream.cc
r9059 r9116 37 37 #include "network_log.h" 38 38 39 #include "player_stats.h" 39 40 40 41 #include "lib/util/loading/factory.h" … … 153 154 assert( peers[0].handshake == NULL ); 154 155 peers[0].handshake = hs; 156 157 hs->setPreferedNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Player" ) ); 158 155 159 // peers[0].handshake->setSynchronized( true ); 156 160 //this->connectSynchronizeable(*hs); … … 392 396 { 393 397 handleNewClient( it->second.userId ); 398 399 if ( PlayerStats::getStats( it->second.userId ) && it->second.handshake->getPreferedNickName() != "" ) 400 { 401 PlayerStats::getStats( it->second.userId )->setNickName( it->second.handshake->getPreferedNickName() ); 402 } 394 403 } 395 404
Note: See TracChangeset
for help on using the changeset viewer.