- Timestamp:
- Jan 18, 2010, 12:05:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network2/src/libraries/network/GamestateManager.cc
r6449 r6450 190 190 // packet::Gamestate* gs = new packet::Gamestate(*gamestate); 191 191 // packet::Gamestate* gs = gamestate; 192 packet::Gamestate *gs = new packet::Gamestate(*gamestate); 192 packet::Gamestate *gs = new packet::Gamestate(*gamestate); //TODO: is this neccessary ? 193 193 // packet::Gamestate *gs = new packet::Gamestate(); 194 194 // gs->collectData( id_, 0x1 ); … … 201 201 if(base) 202 202 { 203 204 // COUT(3) << "diffing" << std::endl; 205 // packet::Gamestate* gs1 = gs; 206 packet::Gamestate *diffed = gs->diff(base); 207 if( diffed->getDataSize() == 0 ) 203 packet::Gamestate *diffed1 = gs->diffVariables(base); 204 if( diffed1->getDataSize() == 0 ) 208 205 { 209 delete diffed ;206 delete diffed1; 210 207 destgamestate = 0; 211 208 return; 212 209 } 213 else 214 gs = diffed; 215 //packet::Gamestate *gs2 = diffed->undiff(gs); 216 // assert(*gs == *gs2); 217 // packet::Gamestate* gs2 = gs->undiff(client); 218 // gs = new packet::Gamestate(*gs); 219 // assert(*gs1==*gs2); 220 } 221 else{ 210 gs = diffed1; 211 } 212 else 213 { 222 214 gs = new packet::Gamestate(*gs); 223 215 }
Note: See TracChangeset
for help on using the changeset viewer.