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

Method unpackUpdate

Engine/source/T3D/levelInfo.cpp:225–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223//-----------------------------------------------------------------------------
224
225void LevelInfo::unpackUpdate(NetConnection *conn, BitStream *stream)
226{
227 Parent::unpackUpdate(conn, stream);
228
229 stream->read( &mNearClip );
230 stream->read( &mVisibleDistance );
231 stream->read( &mDecalBias );
232
233 stream->read( &mFogData.density );
234 stream->read( &mFogData.densityOffset );
235 stream->read( &mFogData.atmosphereHeight );
236 stream->read( &mFogData.color );
237
238 stream->read( &mCanvasClearColor );
239 stream->read( &mWorldSize );
240
241 mAdvancedLightmapSupport = stream->readFlag();
242 stream->read( &mAmbientLightBlendPhase );
243 mathRead( *stream, &mAmbientLightBlendCurve );
244
245 String errorStr;
246 if( !sfxReadAndResolve( stream, &mSoundAmbience, errorStr ) )
247 Con::errorf( "%s", errorStr.c_str() );
248 mSoundDistanceModel = ( SFXDistanceModel ) stream->readInt( 1 );
249
250 if( isProperlyAdded() )
251 {
252 _updateSceneGraph();
253
254 if( mSoundscape )
255 {
256 if( mSoundAmbience )
257 mSoundscape->setAmbience( mSoundAmbience );
258 else
259 mSoundscape->setAmbience( &sDefaultAmbience );
260 }
261
262 SFX->setDistanceModel( mSoundDistanceModel );
263 }
264 stream->read(&mAccuTextureName);
265 setLevelAccuTexture(mAccuTextureName);
266}
267
268//-----------------------------------------------------------------------------
269

Callers

nothing calls this directly

Calls 9

mathReadFunction · 0.85
errorfFunction · 0.85
readFlagMethod · 0.80
readIntMethod · 0.80
setAmbienceMethod · 0.80
sfxReadAndResolveFunction · 0.50
readMethod · 0.45
c_strMethod · 0.45
setDistanceModelMethod · 0.45

Tested by

no test coverage detected