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

Method unpackUpdate

Engine/source/environment/waterBlock.cpp:117–138  ·  view source on GitHub ↗

----------------------------------------------------------------------------- unpackUpdate -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

115// unpackUpdate
116//-----------------------------------------------------------------------------
117void WaterBlock::unpackUpdate(NetConnection* con, BitStream* stream)
118{
119 Parent::unpackUpdate(con, stream);
120
121 F32 gridSize = mGridElementSize;
122 stream->read( &mGridElementSize );
123 if ( gridSize != mGridElementSize )
124 mGenerateVB = true;
125
126 if( stream->readFlag() ) // UpdateMask
127 {
128 Point3F scale;
129 mathRead( *stream, &scale );
130
131 setScale( scale );
132
133 MatrixF objToWorld;
134 stream->readAffineTransform( &objToWorld );
135
136 setTransform( objToWorld );
137 }
138}
139
140//-----------------------------------------------------------------------------
141// Setup vertex and index buffers

Callers

nothing calls this directly

Calls 4

mathReadFunction · 0.85
readFlagMethod · 0.80
readAffineTransformMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected