Changeset 9541 in orxonox.OLD
- Timestamp:
- Jul 28, 2006, 10:33:34 AM (18 years ago)
- Location:
- branches/proxy/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/message_manager.cc
r9529 r9541 275 275 else 276 276 { 277 // forwarding the messages but only if its not a client278 if( !SharedNetworkData::getInstance()->isClient())277 // forwarding the messages but only if its a proxy 278 if( /*!SharedNetworkData::getInstance()->isClient()*/ SharedNetworkData::getInstance()->isProxyServerActive()) 279 279 { 280 280 PRINTF(0)("===========>> Forwarding Message msg with type: %i, from sender %i, to rec: %i\n", messageType, senderId, destinationId); -
branches/proxy/src/lib/network/network_game_manager.cc
r9537 r9541 91 91 bool NetworkGameManager::signalNewPlayer( int userId ) 92 92 { 93 assert( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive());93 assert( SharedNetworkData::getInstance()->isMasterServer()); 94 94 assert( State::getGameRules() ); 95 95 assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) ); -
branches/proxy/src/lib/network/network_stream.cc
r9538 r9541 398 398 //userId = 1; 399 399 // each server (proxy and master) have an address space for new network nodes of 1000 nodes 400 userId = SharedNetworkData::getInstance()->getHostID() * 1000 ;400 userId = SharedNetworkData::getInstance()->getHostID() * 1000 + 1; 401 401 402 402 for ( PeerList::iterator it = peers.begin(); it != peers.end(); it++ ) -
branches/proxy/src/lib/network/player_stats.cc
r9531 r9541 163 163 if ( this->playable && userId == SharedNetworkData::getInstance()->getHostID() ) 164 164 { 165 PRINTF(0)(">>>>>>>>>>>>>>>>>>>>>> assign playable %i to user %i (localuser)\n\n\n", this->playable->getUniqueID(), userId); 165 166 State::getPlayer()->setPlayable( this->playable ); 166 167 // also set the team id -
branches/proxy/src/lib/network/proxy/proxy_control.cc
r9540 r9541 21 21 #include "state.h" 22 22 #include "shared_network_data.h" 23 #include "network_game_manager.h" 23 24 24 25 #include "converter.h" … … 103 104 bool ProxyControl::messageHandlerNewClient( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId ) 104 105 { 105 PRINTF(0)("Got Signal: new player arrived\n"); 106 int userId; 107 // body data length correct? 108 if ( dataLength != INTSIZE ) 109 { 110 PRINTF(2)("new client message has wrong size: %d\n", dataLength ); 111 return true; 112 } 113 // read the userId fromt he message body 114 assert( Converter::byteArrayToInt( data, &userId) == INTSIZE ); 115 116 PRINTF(0)("Got Signal: new player arrived with userId: %i\n", userId); 106 117 // part for the master server 107 118 if( SharedNetworkData::getInstance()->isMasterServer()) 108 119 { 109 120 // we now create the new player ship and stuff... 121 NetworkGameManager::getInstance()->signalNewPlayer(userId); 110 122 } 111 123 else if(SharedNetworkData::getInstance()->isProxyServerActive()) -
branches/proxy/src/world_entities/spawning_point.cc
r9522 r9541 207 207 void SpawningPoint::sendRespawnMessage( int uniqueId ) 208 208 { 209 #warning this byte array is not being deleted according to valginrd210 209 byte * buf = new byte[2*INTSIZE]; 211 210
Note: See TracChangeset
for help on using the changeset viewer.