Changeset 7788 for code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.cc
- Timestamp:
- Dec 21, 2010, 6:09:09 PM (14 years ago)
- Location:
- code/branches/presentation2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2
- Property svn:mergeinfo changed
/code/branches/network3 (added) merged: 7333,7336-7337,7344 /code/branches/network4 (added) merged: 7497,7718,7753-7755 /code/branches/network5 (added) merged: 7757-7759,7772-7778,7780-7781
- Property svn:mergeinfo changed
-
code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.cc
r7401 r7788 123 123 { 124 124 SynchronisableHeader header(mem); 125 assert( !header.isDiffed() ); 125 if( header.isDiffed() ) 126 { 127 mem += header.getDataSize() + header.getSize(); 128 return 0; 129 } 130 // assert( !header.isDiffed() ); 126 131 127 132 COUT(4) << "fabricating object with id: " << header.getObjectID() << std::endl; … … 217 222 * length of varx: size saved int syncvarlist 218 223 * @param mem pointer to allocated memory with enough size 219 * @param sizes FIXME - add doc!224 * @param sizes vector containing sizes of all objects in gamestate (to be appended) 220 225 * @param id gamestateid of the gamestate to be saved (important for priorities) 221 226 * @param mode defines the direction in which the data will be send/received 222 227 * 0x1: server->client 223 * 0x2: client->server (not recommended)228 * 0x2: client->server 224 229 * 0x3: bidirectional 225 230 * @return true: if !doSync or if everything was successfully saved … … 265 270 //tempsize += (*i)->getSize( mode ); 266 271 } 272 assert(tempsize!=0); // if this happens an empty object (with no variables) would be transmitted 267 273 // COUT(4) << endl; 268 274 … … 316 322 mem += SynchronisableHeader::getSize(); 317 323 std::vector<SynchronisableVariableBase *>::iterator i; 318 for(i=syncList_.begin(); i!=syncList_.end(); i++)324 for(i=syncList_.begin(); i!=syncList_.end(); ++i) 319 325 { 320 326 assert( mem <= data+syncHeader2.getDataSize()+SynchronisableHeader::getSize() ); // always make sure we don't exceed the datasize in our stream
Note: See TracChangeset
for help on using the changeset viewer.