Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10114 in orxonox.OLD for trunk/src/lib/network/network_stream.cc


Ignore:
Timestamp:
Dec 19, 2006, 11:55:26 PM (17 years ago)
Author:
patrick
Message:

merged network back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/network_stream.cc

    r9869 r10114  
    128128
    129129  this->bRedirect = false;
     130  this->bSoftRedirect = false;
    130131
    131132  this->currentState = 0;
     
    716717              // init the new message manager
    717718              MessageManager::getInstance()->setUniqueID( it->second.handshake->getMessageManagerId() );
     719              ObjectListBase::replaceIDMap( *(it->second.handshake->getClassIdList()) );
    718720            }
    719721
     
    966968
    967969      // if handshake not finished only sync handshake
    968       if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID())
     970      if ( peer->second.handshake && Handshake::staticClassID() != sync.getClassID() )
    969971        continue;
    970972
     
    972974      if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
    973975             SharedNetworkData::getInstance()->isProxyServerActive() &&  peer->second.isClient())
    974              && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
     976             && Handshake::staticClassID() == sync.getClassID() && sync.getUniqueID() != peer->second.userId )
    975977        continue;
    976978
    977979      /* list of synchronizeables that will never be synchronized over the network: */
    978980      // do not sync null parent
    979       if ( NullParent::staticClassID() == sync.getLeafClassID())
     981      if ( NullParent::staticClassID() == sync.getClassID())
    980982        continue;
    981983
    982984
    983       assert( sync.getLeafClassID() != 0);
     985      assert( sync.getClassID() != 0);
    984986
    985987      assert( offset + INTSIZE <= UDP_PACKET_SIZE );
     
    11881190          if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId)
    11891191          {
    1190             PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
     1192            PRINTF(0)("Don't create Object with ID %d, ignored!\n", (int)leafClassId);
    11911193            offset += syncDataLength;
    11921194            continue;
    11931195          }
    11941196          else
    1195             ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId );
    1196 
     1197                  b = Factory::fabricate( ObjectListBase::retrieveIdentity( leafClassId ) );
     1198         
    11971199          if ( !b )
    11981200          {
    1199             PRINTF(1)("Could not fabricate Object with classID %x\n", leafClassId);
     1201            PRINTF(1)("Could not fabricate Object with classID %d\n", leafClassId);
    12001202            offset += syncDataLength;
    12011203            continue;
     
    12081210            sync->setSynchronized(true);
    12091211
    1210             PRINTF(0)("Fabricated %s with id %d\n", sync->getClassCName(), sync->getUniqueID());
     1212            PRINTF(1)("Fabricated %s with id %d\n", sync->getClassCName(), sync->getUniqueID());
    12111213          }
    12121214          else
    12131215          {
    1214             PRINTF(1)("Class with ID %x is not a synchronizeable!\n", (int)leafClassId);
     1216            PRINTF(1)("Class with ID %d is not a synchronizeable!\n", (int)leafClassId);
    12151217            delete b;
    12161218            offset += syncDataLength;
Note: See TracChangeset for help on using the changeset viewer.