C_GENPCRagdoll::~C_GENPCRagdoll()
{
	PhysCleanupFrictionSounds( this );

	if ( m_hNPC )
		m_hNPC->CreateModelInstance();
}
Example #2
0
C_HL2MPRagdoll::~C_HL2MPRagdoll()
{
	PhysCleanupFrictionSounds( this );

	if ( m_hPlayer )
	{
		m_hPlayer->CreateModelInstance();
	}
}
C_StriderRagdoll::~C_StriderRagdoll()
{
	PhysCleanupFrictionSounds( this );

	if ( m_hStrider )
	{
		m_hStrider->CreateModelInstance();
	}
}
C_PhysPropClientside::~C_PhysPropClientside()
{
	if ( m_pRespawnZone )
	{
		m_pRespawnZone->PropDestroyed( this );
	}

	PhysCleanupFrictionSounds( this );
	VPhysicsDestroyObject();
	s_PhysPropList.FindAndRemove( this );
}
void CGEPropDynamic::Event_Killed(const CTakeDamageInfo &info)
{
	// More or less just the kill event copied straight from prop_physics_respawnable, though it does not teleport as it cannot move on its own.

	IPhysicsObject *pPhysics = VPhysicsGetObject();
	if (pPhysics && !pPhysics->IsMoveable())
	{
		pPhysics->EnableMotion(true);
		VPhysicsTakeDamage(info);
	}

	Break(info.GetInflictor(), info);

	PhysCleanupFrictionSounds(this);

	VPhysicsDestroyObject();

	CBaseEntity::PhysicsRemoveTouchedList(this);
	CBaseEntity::PhysicsRemoveGroundList(this);
	DestroyAllDataObjects();

	AddEffects(EF_NODRAW);

	if (IsOnFire() || IsDissolving())
	{
		UTIL_Remove(GetEffectEntity());
	}

	SetContextThink(NULL, 0, "PROP_CLEARFLAGS");

	if (m_flRespawnTime > 0)
	{
		SetThink(&CGEPropDynamic::Materialize);
		SetNextThink(gpGlobals->curtime + m_flRespawnTime);
	}
}
Example #6
0
C_SDKRagdoll::~C_SDKRagdoll()
{
	PhysCleanupFrictionSounds( this );
}
C_BaseNetworkedRagdoll::~C_BaseNetworkedRagdoll()
{
	PhysCleanupFrictionSounds( this );
}