- Timestamp:
- Feb 1, 2006, 5:07:36 PM (19 years ago)
- Location:
- branches/network/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/playable.cc
r6959 r6963 286 286 { 287 287 SYNCHELP_READ_BEGIN(); 288 288 289 byte b; 290 SYNCHELP_READ_BYTE( b, NWT_PL_B ); 291 289 292 byte flags; 290 291 SYNCHELP_READ_BYTE( flags, NWT_PL_FLAGS ); 292 293 bFire = (flags & FLAGS_bFire) != 0; 293 294 if ( b == DATA_FLAGS ) 295 { 296 SYNCHELP_READ_BYTE( flags, NWT_PL_FLAGS ); 297 298 bFire = (flags & FLAGS_bFire) != 0; 299 300 return SYNCHELP_READ_N; 301 } 302 303 if ( b == DATA_SCORE ) 304 { 305 int newScore; 306 SYNCHELP_READ_BYTE( newScore, NWT_PL_SCORE ); 307 setScore( newScore ); 308 309 return SYNCHELP_READ_N; 310 } 294 311 295 312 return SYNCHELP_READ_N; … … 299 316 { 300 317 SYNCHELP_WRITE_BEGIN(); 318 319 if ( score != oldScore && isServer() ) 320 { 321 SYNCHELP_WRITE_BYTE( DATA_SCORE, NWT_PL_B); 322 SYNCHELP_WRITE_INT( score, NWT_PL_SCORE ); 323 oldScore = score; 324 325 return SYNCHELP_WRITE_N; 326 } 327 301 328 byte flags = 0; 302 329 … … 314 341 bool Playable::needsReadSync( ) 315 342 { 316 //if ( score != oldScore)317 //return true;343 if ( score != oldScore && isServer() ) 344 return true; 318 345 319 346 byte flags = 0; -
branches/network/src/world_entities/space_ships/space_ship.cc
r6959 r6963 761 761 } 762 762 763 if( Playable::needsReadSync() )763 while ( Playable::needsReadSync() ) 764 764 { 765 765 sentSomething = true;
Note: See TracChangeset
for help on using the changeset viewer.