Changeset 2133 for code/branches/objecthierarchy
- Timestamp:
- Nov 4, 2008, 6:39:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/Synchronisable.cc
r2132 r2133 69 69 objectFrequency_=1; 70 70 objectMode_=0x1; // by default do not send data to server 71 objectID=idCounter++; 71 if(Host::running() && Host::isServer()) 72 objectID=idCounter++; //this is only needed when running a server 73 else 74 objectID=OBJECTID_UNKNOWN; 72 75 classID = (unsigned int)-1; 73 76 syncList = new std::list<synchronisableVariable *>; 77 78 #ifndef NDEBUG 79 ObjectList<Synchronisable>::iterator it; 80 for(it = ObjectList<Synchronisable>::begin(); it!=ObjectList<Synchronisable>::end(); ++it){ 81 if( it->getObjectID()==this->objectID ) 82 assert(*it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0)); 83 } 84 #endif 74 85 75 86 this->creatorID = OBJECTID_UNKNOWN; … … 170 181 creator = dynamic_cast<BaseObject*>(synchronisable_creator); 171 182 } 183 assert(getSynchronisable(header->objectID)==0); //make sure no object with this id exists 172 184 BaseObject *bo = id->fabricate(creator); 173 185 assert(bo);
Note: See TracChangeset
for help on using the changeset viewer.