Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6674 in orxonox.OLD


Ignore:
Timestamp:
Jan 24, 2006, 4:11:16 PM (18 years ago)
Author:
patrick
Message:

network: NullParent now is also synced over network, some more debug output and other minor changes

Location:
branches/network/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/coord/p_node.cc

    r6660 r6674  
    696696  {
    697697    PNode::nullParent = new PNode(NULL, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_TO_NULL);
     698    PNode::nullParent->setClassID(CL_NULL_PARENT, "NullParent");
    698699    PNode::nullParent->setName("NullParent");
    699700    PNode::nullParent->setSynchronized(true);
  • branches/network/src/lib/network/network_game_manager.cc

    r6673 r6674  
    354354  }
    355355
     356  PRINTF(0)("ExecuteCreateEntity: server side: classID: %x, uniqueID: %i, owner: %i\n", classID, uniqueID, owner);
    356357  doCreateEntity( classID, uniqueID, owner );
    357358
     
    421422    if( (*it)->beSynchronized())
    422423    {
    423       PRINTF(0)("SENDING ENTITY %s id %d\n", (*it)->getClassName(), (*it)->getUniqueID() );
     424      PRINTF(0)("SENDING ENTITY %s classid: %x, uniqueid %d\n", (*it)->getClassName(), (*it)->getLeafClassID(), (*it)->getUniqueID() );
    424425      if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getLeafClassID()) ) )
    425426        return;
     
    481482BaseObject* NetworkGameManager::doCreateEntity( ClassID classID, int uniqueID, int owner )
    482483{
    483   BaseObject * b = Factory::fabricate( classID );
     484  PRINTF(0)("Creating Entity via Factory: classid: %x, uniqueID: %i, owner: %i\n", classID, uniqueID, owner);
     485
     486  BaseObject * b;
     487  /* These are some small exeptions in creation: Not all objects can/should be created via Factory */
     488  /* Exception 1: NullParent */
     489  if( classID == CL_NULL_PARENT)
     490  {
     491    b = PNode::getNullParent();
     492  }
     493  else
     494    b = Factory::fabricate( classID );
    484495
    485496  if ( !b )
     
    729740  i += Converter::byteArrayToInt( &data[i], &owner );
    730741
     742  PRINTF(0)("handleCreateEntity: client side: classID: %x, uniqueID: %i, owner: %i\n", classID, uniqueID, owner);
    731743  doCreateEntity( (ClassID)classID, uniqueID, owner );
    732744
  • branches/network/src/world_entities/weapons/weapon.cc

    r6660 r6674  
    105105
    106106  // set this object to be synchronized over network
    107   this->setSynchronized(true);
     107  //this->setSynchronized(true);
    108108}
    109109
Note: See TracChangeset for help on using the changeset viewer.