Changeset 6994 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Feb 2, 2006, 11:57:54 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r6987 r6994 305 305 { 306 306 SYNCHELP_READ_BEGIN(); 307 307 308 byte b; 309 SYNCHELP_READ_BYTE( b, NWT_PL_B ); 310 308 311 byte flags; 309 310 SYNCHELP_READ_BYTE( flags, NWT_PL_FLAGS ); 311 312 bFire = (flags & FLAGS_bFire) != 0; 312 313 if ( b == DATA_FLAGS ) 314 { 315 SYNCHELP_READ_BYTE( flags, NWT_PL_FLAGS ); 316 317 bFire = (flags & FLAGS_bFire) != 0; 318 319 return SYNCHELP_READ_N; 320 } 321 322 if ( b == DATA_SCORE ) 323 { 324 int newScore; 325 SYNCHELP_READ_BYTE( newScore, NWT_PL_SCORE ); 326 setScore( newScore ); 327 328 return SYNCHELP_READ_N; 329 } 313 330 314 331 return SYNCHELP_READ_N; … … 318 335 { 319 336 SYNCHELP_WRITE_BEGIN(); 337 338 if ( score != oldScore && isServer() ) 339 { 340 SYNCHELP_WRITE_BYTE( DATA_SCORE, NWT_PL_B); 341 SYNCHELP_WRITE_INT( score, NWT_PL_SCORE ); 342 oldScore = score; 343 344 return SYNCHELP_WRITE_N; 345 } 346 320 347 byte flags = 0; 321 348 … … 324 351 325 352 353 SYNCHELP_WRITE_BYTE( DATA_FLAGS, NWT_PL_B); 326 354 SYNCHELP_WRITE_BYTE( flags, NWT_PL_FLAGS ); 327 355 oldFlags = flags; … … 333 361 bool Playable::needsReadSync( ) 334 362 { 335 //if ( score != oldScore)336 //return true;363 if ( score != oldScore && isServer() ) 364 return true; 337 365 338 366 byte flags = 0; -
trunk/src/world_entities/playable.h
r6986 r6994 84 84 int oldScore; 85 85 86 // HACK: explosion emitter86 //TODO HACK: explosion emitter 87 87 DotEmitter* emitter; 88 88 SpriteParticles* explosionParticles; -
trunk/src/world_entities/space_ships/space_ship.cc
r6986 r6994 97 97 { 98 98 //this->loadModel("models/ships/reap_#.obj"); 99 // /HACK this is only for network multiplayer games.99 //TODO HACK this is only for network multiplayer games. 100 100 if( this->getOwner()%2 == 0) 101 101 { … … 762 762 } 763 763 764 if( Playable::needsReadSync() )764 while ( Playable::needsReadSync() ) 765 765 { 766 766 sentSomething = true;
Note: See TracChangeset
for help on using the changeset viewer.