Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2006, 10:35:23 PM (18 years ago)
Author:
rennerc
Message:

ClassID synchronization might work. at least it still works with it :D

File:
1 edited

Legend:

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

    r9869 r9909  
    2222#include "debug.h"
    2323
     24#include "synchronizeable_var/synchronizeable_classid_list.h"
     25
     26std::map< std::string, int >* Handshake::classIdList = NULL;
    2427
    2528ObjectListDefinition(Handshake);
     
    3235  this->registerObject(this, Handshake::_objectList);
    3336
     37  if ( !Handshake::classIdList )
     38  {
     39    //TODO who else?
     40    if ( SharedNetworkData::getInstance()->isMasterServer() )
     41    {
     42      Handshake::classIdList = ObjectListBase::createStrToId();
     43    }
     44    else
     45    {
     46      Handshake::classIdList = new std::map< std::string, int >();
     47    }
     48  }
    3449
    3550  // register all variable handlers
     
    5267  registerVar( new SynchronizeableIP( &this->proxy2, &this->proxy2, "proxy server 2", PERMISSION_MASTER_SERVER ) );
    5368  registerVar( new SynchronizeableInt( &this->redirectProxy, &this->redirectProxy, "proxy server redirection flag", PERMISSION_MASTER_SERVER ) );
     69 
     70  registerVar( new SynchronizeableClassIDList( Handshake::classIdList, Handshake::classIdList, "classId List", PERMISSION_MASTER_SERVER ) );
    5471
    5572
Note: See TracChangeset for help on using the changeset viewer.