void CRagdollProp::UpdateOnRemove( void )
{
	// Set to null so that the destructor's call to DestroyObject won't destroy
	//  m_pObjects[ 0 ] twice since that's the physics object for the prop
	VPhysicsSetObject( NULL );

	RagdollDestroy( m_ragdoll );
	// Chain to base after doing our own cleanup to mimic
	//  destructor unwind order
	BaseClass::UpdateOnRemove();
}
예제 #2
0
CRagdoll::~CRagdoll( void )
{
	for ( int i = 0; i < m_ragdoll.listCount; i++ )
	{
		if ( m_ragdoll.list[i].pObject )
		{
			g_pPhysSaveRestoreManager->ForgetModel( m_ragdoll.list[i].pObject );
		}
	}

	RagdollDestroy( m_ragdoll );
}
예제 #3
0
파일: ragdoll.cpp 프로젝트: BoXorz/MSS
CRagdoll::~CRagdoll( void )
{
    for ( int i = 0; i < m_ragdoll.listCount; i++ )
    {
        IPhysicsObject *pObject = m_ragdoll.list[i].pObject;
        if ( pObject )
        {
            g_pPhysSaveRestoreManager->ForgetModel( m_ragdoll.list[i].pObject );
            // Disable collision on all ragdoll parts before calling RagdollDestroy
            // (which might cause touch callbacks on the ragdoll otherwise, which is
            // very bad for a half deleted ragdoll).
            pObject->EnableCollisions( false );
        }
    }

    RagdollDestroy( m_ragdoll );
}
예제 #4
0
void CRagdollProp::UpdateOnRemove( void )
{
	for ( int i = 0; i < m_ragdoll.listCount; i++ )
	{
		if ( m_ragdoll.list[i].pObject )
		{
			g_pPhysSaveRestoreManager->ForgetModel( m_ragdoll.list[i].pObject );
		}
	}

	// Set to null so that the destructor's call to DestroyObject won't destroy
	//  m_pObjects[ 0 ] twice since that's the physics object for the prop
	VPhysicsSetObject( NULL );

	RagdollDestroy( m_ragdoll );
	// Chain to base after doing our own cleanup to mimic
	//  destructor unwind order
	BaseClass::UpdateOnRemove();
}