Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cl_gib_lifetime for dropped weapons from dead players #259

Merged
merged 2 commits into from May 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cl_dll/ff/c_ff_player.cpp
Expand Up @@ -1081,7 +1081,7 @@ void C_FFRagdoll::CreateRagdoll()
// We can also spawn a valid weapon
if (pWeapon && pWeapon->GetWeaponID() < FF_WEAPON_DEPLOYDISPENSER)
{
C_Gib *pGib = C_Gib::CreateClientsideGib(pWeapon->GetFFWpnData().szWorldModel, pWeapon->GetAbsOrigin(), GetAbsVelocity(), Vector(0, 0, 0), 10.0f);
C_Gib *pGib = C_Gib::CreateClientsideGib(pWeapon->GetFFWpnData().szWorldModel, pWeapon->GetAbsOrigin(), GetAbsVelocity(), Vector(0, 0, 0), cl_gib_lifetime.GetFloat());

if (pGib)
{
Expand Down
4 changes: 1 addition & 3 deletions dlls/ff/ff_player.cpp
Expand Up @@ -2188,15 +2188,13 @@ void CFFPlayer::CreateRagdollEntity(const CTakeDamageInfo *info)

// not everything that gets here has an info
// when we change class we dont have an inflictor either
pRagdoll->m_vecRagdollVelocity = GetAbsVelocity();
if ( info )
{
pRagdoll->m_vecRagdollVelocity = GetAbsVelocity();
pRagdoll->m_vecForce = info->GetDamageForce();
}
else
{
//use whatever the players velocity was
pRagdoll->m_vecRagdollVelocity = GetAbsVelocity();
pRagdoll->m_vecForce = Vector(0, 0, 0);
}

Expand Down