Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6326 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Dec 28, 2005, 2:13:57 AM (19 years ago)
Author:
rennerc
Message:
 
Location:
branches/network/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/converter.cc

    r6285 r6326  
    461461 * @return: the number of read bytes in byte array
    462462 */
    463 int Converter::byteArrayToStringM( const byte * a, char * & s )
     463int Converter::byteArrayToStringM( const byte * a, char*& s )
    464464{
    465465  int length;
  • branches/network/src/lib/network/network_game_manager.cc

    r6304 r6326  
    384384
    385385  // -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() ) )
    387387    return;
    388388
     
    391391  while ( it != e )
    392392  {
    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;
    399396      //PRINTF(0)("SendEntityList: ClassID = %x\n", (*it)->getRealClassID());
    400397
    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;
    407403
    408404    it++;
    409405  }
     406
     407
    410408}
    411409
     
    695693    i += Converter::byteArrayToInt( &data[i], &owner );
    696694
    697     doCreateEntity( (ClassID)classID, uniqueID, owner );
     695    if ( classID != CL_NETWORK_GAME_MANAGER && classID != CL_HANDSHAKE )
     696      doCreateEntity( (ClassID)classID, uniqueID, owner );
    698697
    699698  }
  • branches/network/src/lib/network/network_stream.cc

    r6304 r6326  
    233233        if ( header->synchronizeableID < this->maxConnections+2 )
    234234        {
    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);
    236236          header->synchronizeableID = 0;
    237237        }
    238238        else
    239239        {
    240           if ( !isServer() ) PRINTF(0)("UNIQUEID=%d\n", header->synchronizeableID);
     240          //if ( !isServer() ) PRINTF(0)("UNIQUEID=%d\n", header->synchronizeableID);
    241241        }
    242242
  • branches/network/src/lib/sound/sound_engine.cc

    r6142 r6326  
    288288  // INITIALIZING THE DEVICE:
    289289
    290 #ifdef AL_VERSION_1_1
     290#ifndef AL_VERSION_1_1
    291291  ALCchar deviceName[] =
    292292
  • branches/network/src/world_entities/skybox.cc

    r6277 r6326  
    218218  setIsOutOfSync( false );
    219219
    220   /*int flsize = Converter::byteArrayToFloat( data, &size );
    221   Converter::byteArrayToString( data+flsize, textureName, length-flsize );*/
    222 
    223220  SYNCHELP_READ_BEGIN();
    224   SYNCHELP_READ_FLOAT(size);
     221  SYNCHELP_READ_FLOAT( size );
    225222  SYNCHELP_READ_STRING( textureName, 1024 );
    226223
    227   //PRINT(0)("GOT DATA: size=%f texture=%s\n", size, textureName);
     224  PRINT(0)("GOT DATA: size=%f texture='%s'\n", size, textureName);
    228225
    229226  this->setSize( size );
    230   this->setTexture( textureName );
     227  this->setTextureAndType( textureName, "jpg" );
    231228  this->rebuild();
    232229}
     
    245242  if ( rec > 0 )
    246243  {
     244    PRINT(0)("SEND DATA: size=%f texture='%s'\n", size, textureName);
    247245    *reciever = rec;
    248246
  • branches/network/src/world_entities/world_entity.cc

    r6294 r6326  
    349349    loadModel( modelFileName );
    350350  }
    351   delete[] modelFileName;
     351  //delete []modelFileName;
    352352}
    353353
Note: See TracChangeset for help on using the changeset viewer.