Changeset 1245 for code/branches/network3/src/network/Synchronisable.cc
- Timestamp:
- May 7, 2008, 4:39:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network3/src/network/Synchronisable.cc
r1232 r1245 50 50 51 51 52 int Synchronisable::state_= 1; // detemines wheter we are server (default) or client52 int Synchronisable::state_=0x1; // detemines wheter we are server (default) or client 53 53 54 54 /** … … 165 165 for(i=syncList->begin(); n<datasize && i!=syncList->end(); ++i){ 166 166 //(std::memcpy(retVal.data+n, (const void*)(&(i->size)), sizeof(int)); 167 if( ((*i)->mode & state_) == 0 ) 167 if( ((*i)->mode & state_) == 0 ){ 168 COUT(4) << "not getting data: " << std::endl; 168 169 continue; // this variable should only be received 170 } 169 171 switch((*i)->type){ 170 172 case DATA: … … 199 201 COUT(5) << "Synchronisable: objectID " << vars.objectID << ", classID " << vars.classID << " size: " << vars.length << " synchronising data" << std::endl; 200 202 for(i=syncList->begin(); i!=syncList->end(); i++){ 201 if( ((*i)->mode ^ state_) == 0 ) 202 continue; // this variable should only be sent 203 if( ((*i)->mode ^ state_) == 0 ){ 204 COUT(5) << "synchronisable: not updating variable " << std::endl; 205 continue; // this variable should only be updated 206 } 203 207 COUT(5) << "Synchronisable: element size: " << (*i)->size << " type: " << (*i)->type << std::endl; 204 208 switch((*i)->type){
Note: See TracChangeset
for help on using the changeset viewer.