Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 23, 2006, 4:12:02 PM (18 years ago)
Author:
patrick
Message:

network: now sync is on the road again, clients segfaults on assertion

File:
1 edited

Legend:

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

    r6661 r6662  
    249249      s->setUniqueID( newUniqueID++ );
    250250      s->setOwner( 0 );
     251      // all entities created via this function are added automaticaly to the synchronizeable list
     252      s->setSynchronized(true);
    251253      return b;
    252254    }
     
    408410  while ( it != e )
    409411  {
    410     PRINTF(5)("SENDING ENTITY %s id %d\n", (*it)->getClassName(), (*it)->getUniqueID() );
    411     if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafClassID()) ) )
    412       return;
    413 
    414     if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getUniqueID()) ) )
    415       return;
    416 
    417     if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) )
    418       return;
    419 
     412    if( (*it)->beSynchronized())
     413    {
     414      PRINTF(0)("SENDING ENTITY %s id %d\n", (*it)->getClassName(), (*it)->getUniqueID() );
     415      if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafClassID()) ) )
     416        return;
     417
     418      if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getUniqueID()) ) )
     419        return;
     420
     421      if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) )
     422        return;
     423    }
    420424    it++;
    421425  }
     
    481485    s->setUniqueID( uniqueID );
    482486    s->setOwner( owner );
    483     this->networkStream->connectSynchronizeable( *s );
     487    //this->networkStream->connectSynchronizeable( *s );
    484488    if ( !isServer() )
    485489      s->setIsOutOfSync( true );
Note: See TracChangeset for help on using the changeset viewer.