Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8832 in orxonox.OLD for branches/multi_player_map/src


Ignore:
Timestamp:
Jun 27, 2006, 4:29:19 PM (18 years ago)
Author:
rennerc
Message:

WorldEntity: list is synced now

Location:
branches/multi_player_map/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/multi_player_map/src/world_entities/world_entity.cc

    r8778 r8832  
    9090  modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
    9191  scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling" ) );
     92  list_handle = registerVarId( new SynchronizeableInt( (int*)&objectListNumber, &list_write, "list" ) );
    9293}
    9394
     
    193194        PRINTF(1)("OBJ-File %s not found.\n", fileName.c_str());
    194195
    195       if( modelNumber == 0)
     196      if( modelNumber == 0 )
    196197        this->buildObbTree(obbTreeDepth);
    197198    }
     
    832833    loadModel( modelFileName, scaling );
    833834  }
     835 
     836  if ( std::find( id.begin(), id.end(), list_handle ) != id.end() )
     837  {
     838    this->toList( (OM_LIST)list_write );
     839  }
    834840
    835841  PNode::varChangeHandler( id );
  • branches/multi_player_map/src/world_entities/world_entity.h

    r8777 r8832  
    184184  std::string             modelFileName;                   //!< model's file name
    185185  int                     modelFileName_handle;            //!< handle for syncing var
     186 
     187  int                     list_write;                      //!< entity's list
     188  int                     list_handle;                     //!< handle for list changes
    186189
    187190  CollisionHandle*        collisionHandles[CREngine::CR_NUMBER];  //!< the list of the collision reactions
Note: See TracChangeset for help on using the changeset viewer.