Changeset 2154
- Timestamp:
- Nov 7, 2008, 11:28:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/packet/Gamestate.cc
r2132 r2154 358 358 objectOffset=sizeof(synchronisableHeader); //skip the size and the availableData variables in the objectheader 359 359 if(it->second->doSelection(HEADER->id)){ 360 newobjectheader->dataAvailable=true; //TODO: probably not neccessary 361 while(objectOffset<objectsize){ 362 *(newdata + objectOffset)=*(origdata + objectOffset); // copy the data 363 objectOffset++; 364 } 360 assert(newobjectheader->dataAvailable==true); 361 memcpy(newdata+objectOffset, origdata+objectOffset, objectsize-objectOffset); 365 362 }else{ 366 363 newobjectheader->dataAvailable=false; 367 while(objectOffset<objectsize){ 368 *(newdata+objectOffset)=0; // set to 0 369 objectOffset++; 370 } 364 memset(newdata+objectOffset, 0, objectsize-objectOffset); 371 365 assert(objectOffset==objectsize); 372 366 }
Note: See TracChangeset
for help on using the changeset viewer.