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

Method unpackUpdate

Engine/source/scene/sceneObject.cpp:818–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816//-----------------------------------------------------------------------------
817
818void SceneObject::unpackUpdate( NetConnection* conn, BitStream* stream )
819{
820 Parent::unpackUpdate( conn, stream );
821
822 // FlagMask
823 if ( stream->readFlag() )
824 mObjectFlags = stream->readRangedU32( 0, getObjectFlagMax() );
825
826 // MountedMask
827 if ( stream->readFlag() )
828 {
829 if ( stream->readFlag() )
830 {
831 S32 gIndex = stream->readInt( NetConnection::GhostIdBitSize );
832 SceneObject* obj = dynamic_cast<SceneObject*>( conn->resolveGhost( gIndex ) );
833 S32 node = -1;
834 if ( stream->readFlag() ) // node != -1
835 node = stream->readInt( NumMountPointBits );
836 MatrixF xfm;
837 mathRead( *stream, &xfm );
838 if ( !obj )
839 {
840 conn->setLastError( "Invalid packet from server." );
841 return;
842 }
843 obj->mountObject( this, node, xfm );
844 }
845 else
846 unmount();
847 }
848}
849
850//-----------------------------------------------------------------------------
851

Callers

nothing calls this directly

Calls 7

mathReadFunction · 0.85
readFlagMethod · 0.80
readRangedU32Method · 0.80
readIntMethod · 0.80
resolveGhostMethod · 0.80
setLastErrorMethod · 0.45
mountObjectMethod · 0.45

Tested by

no test coverage detected