| 522 | } |
| 523 | |
| 524 | void ScatterSky::unpackUpdate(NetConnection *con, BitStream *stream) |
| 525 | { |
| 526 | Parent::unpackUpdate(con, stream); |
| 527 | |
| 528 | if ( stream->readFlag() ) // TimeMask |
| 529 | { |
| 530 | F32 temp = 0; |
| 531 | stream->read( &temp ); |
| 532 | setAzimuth( temp ); |
| 533 | |
| 534 | stream->read( &temp ); |
| 535 | setElevation( temp ); |
| 536 | } |
| 537 | |
| 538 | if ( stream->readFlag() ) // UpdateMask |
| 539 | { |
| 540 | stream->read( &mRayleighScattering ); |
| 541 | stream->read( &mRayleighScattering4PI ); |
| 542 | |
| 543 | stream->read( &mMieScattering ); |
| 544 | stream->read( &mMieScattering4PI ); |
| 545 | |
| 546 | stream->read( &mSunSize ); |
| 547 | |
| 548 | stream->read( &mSkyBrightness ); |
| 549 | |
| 550 | stream->read( &mMiePhaseAssymetry ); |
| 551 | |
| 552 | stream->read( &mSphereInnerRadius ); |
| 553 | stream->read( &mSphereOuterRadius ); |
| 554 | |
| 555 | stream->read( &mScale ); |
| 556 | |
| 557 | LinearColorF tmpColor( 0, 0, 0 ); |
| 558 | |
| 559 | stream->read( &tmpColor ); |
| 560 | |
| 561 | stream->read( &mWavelength4[0] ); |
| 562 | stream->read( &mWavelength4[1] ); |
| 563 | stream->read( &mWavelength4[2] ); |
| 564 | |
| 565 | stream->read( &mRayleighScaleDepth ); |
| 566 | stream->read( &mMieScaleDepth ); |
| 567 | |
| 568 | stream->read( &mNightColor ); |
| 569 | stream->read( &mNightFogColor ); |
| 570 | stream->read( &mAmbientScale ); |
| 571 | stream->read( &mSunScale ); |
| 572 | stream->read( &mFogScale ); |
| 573 | F32 colorizeAmt; |
| 574 | stream->read( &colorizeAmt ); |
| 575 | |
| 576 | if(mColorizeAmt != colorizeAmt) { |
| 577 | mColorizeAmt = colorizeAmt; |
| 578 | mShader = NULL; //forces shader refresh |
| 579 | } |
| 580 | |
| 581 | stream->read( &mColorize ); |
nothing calls this directly
no test coverage detected