MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / unpackUpdate

Method unpackUpdate

Engine/source/environment/scatterSky.cpp:524–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524void 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 );

Callers

nothing calls this directly

Calls 8

mPowFunction · 0.85
readFlagMethod · 0.80
readRangedU32Method · 0.80
unpackExtendedMethod · 0.80
findObjectFunction · 0.50
readMethod · 0.45
setLastErrorMethod · 0.45
readSTStringMethod · 0.45

Tested by

no test coverage detected