Changeset 6326 in orxonox.OLD for branches/network
- Timestamp:
- Dec 28, 2005, 2:13:57 AM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/converter.cc
r6285 r6326 461 461 * @return: the number of read bytes in byte array 462 462 */ 463 int Converter::byteArrayToStringM( const byte * a, char *& s )463 int Converter::byteArrayToStringM( const byte * a, char*& s ) 464 464 { 465 465 int length; -
branches/network/src/lib/network/network_game_manager.cc
r6304 r6326 384 384 385 385 // -2 because you must not send network_game_manager and handshake 386 if ( !writeToClientBuffer( outBuffer[userID], networkStream->getSyncCount() -2) )386 if ( !writeToClientBuffer( outBuffer[userID], networkStream->getSyncCount() ) ) 387 387 return; 388 388 … … 391 391 while ( it != e ) 392 392 { 393 if ( (*it)->getLeafID() != CL_NETWORK_GAME_MANAGER && (*it)->getLeafID() != CL_HANDSHAKE ) 394 { 395 396 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafID()) ) ) 397 return; 398 393 394 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafID()) ) ) 395 return; 399 396 //PRINTF(0)("SendEntityList: ClassID = %x\n", (*it)->getRealClassID()); 400 397 401 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getUniqueID()) ) ) 402 return; 403 404 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) ) 405 return; 406 } 398 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getUniqueID()) ) ) 399 return; 400 401 if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) ) 402 return; 407 403 408 404 it++; 409 405 } 406 407 410 408 } 411 409 … … 695 693 i += Converter::byteArrayToInt( &data[i], &owner ); 696 694 697 doCreateEntity( (ClassID)classID, uniqueID, owner ); 695 if ( classID != CL_NETWORK_GAME_MANAGER && classID != CL_HANDSHAKE ) 696 doCreateEntity( (ClassID)classID, uniqueID, owner ); 698 697 699 698 } -
branches/network/src/lib/network/network_stream.cc
r6304 r6326 233 233 if ( header->synchronizeableID < this->maxConnections+2 ) 234 234 { 235 if ( !isServer() ) PRINTF(0)("RESET UNIQUEID FROM %d TO 0 maxCon=%d\n", header->synchronizeableID, this->maxConnections);235 //if ( !isServer() ) PRINTF(0)("RESET UNIQUEID FROM %d TO 0 maxCon=%d\n", header->synchronizeableID, this->maxConnections); 236 236 header->synchronizeableID = 0; 237 237 } 238 238 else 239 239 { 240 if ( !isServer() ) PRINTF(0)("UNIQUEID=%d\n", header->synchronizeableID);240 //if ( !isServer() ) PRINTF(0)("UNIQUEID=%d\n", header->synchronizeableID); 241 241 } 242 242 -
branches/network/src/lib/sound/sound_engine.cc
r6142 r6326 288 288 // INITIALIZING THE DEVICE: 289 289 290 #if def AL_VERSION_1_1290 #ifndef AL_VERSION_1_1 291 291 ALCchar deviceName[] = 292 292 -
branches/network/src/world_entities/skybox.cc
r6277 r6326 218 218 setIsOutOfSync( false ); 219 219 220 /*int flsize = Converter::byteArrayToFloat( data, &size );221 Converter::byteArrayToString( data+flsize, textureName, length-flsize );*/222 223 220 SYNCHELP_READ_BEGIN(); 224 SYNCHELP_READ_FLOAT( size);221 SYNCHELP_READ_FLOAT( size ); 225 222 SYNCHELP_READ_STRING( textureName, 1024 ); 226 223 227 //PRINT(0)("GOT DATA: size=%f texture=%s\n", size, textureName);224 PRINT(0)("GOT DATA: size=%f texture='%s'\n", size, textureName); 228 225 229 226 this->setSize( size ); 230 this->setTexture ( textureName);227 this->setTextureAndType( textureName, "jpg" ); 231 228 this->rebuild(); 232 229 } … … 245 242 if ( rec > 0 ) 246 243 { 244 PRINT(0)("SEND DATA: size=%f texture='%s'\n", size, textureName); 247 245 *reciever = rec; 248 246 -
branches/network/src/world_entities/world_entity.cc
r6294 r6326 349 349 loadModel( modelFileName ); 350 350 } 351 delete[]modelFileName;351 //delete []modelFileName; 352 352 } 353 353
Note: See TracChangeset
for help on using the changeset viewer.