Beispiel #1
0
void CElementRPCs::SetElementAttachedOffsets ( CClientEntity* pSource, NetBitStreamInterface& bitStream )
{
    SPositionSync position ( true );
    SRotationRadiansSync rotation ( true );
    if ( position.Read ( bitStream ) && rotation.Read ( bitStream ) )
    {
        pSource->SetAttachedOffsets ( position.data.vecPosition, rotation.data.vecRotation );
    }
}
Beispiel #2
0
void CElementRPCs::SetElementAttachedOffsets ( NetBitStreamInterface& bitStream )
{
    ElementID ID;
    SPositionSync position ( true );
    SRotationDegreesSync rotation ( true );
    if ( bitStream.Read ( ID ) && position.Read ( bitStream ) && rotation.Read ( bitStream ) )
    {
        CClientEntity* pEntity = CElementIDs::GetElement ( ID );
        if ( pEntity )
        {
            pEntity->SetAttachedOffsets ( position.data.vecPosition, rotation.data.vecRotation );
        }
    }
}