| 816 | //----------------------------------------------------------------------------- |
| 817 | |
| 818 | void 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 |
nothing calls this directly
no test coverage detected