Skip to content

Commit

Permalink
game: client: cstrike15: Re-enable violent ragdolls and blood pool
Browse files Browse the repository at this point in the history
  • Loading branch information
tyabus committed Mar 30, 2024
1 parent 3869b10 commit 27f1476
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
18 changes: 7 additions & 11 deletions game/client/cstrike15/c_cs_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ ConVar cl_show_equipment_value( "cl_show_equipment_value", "0" );

ConVar cl_show_clan_in_death_notice("cl_show_clan_in_death_notice", "1", FCVAR_CLIENTDLL | FCVAR_RELEASE | FCVAR_ARCHIVE, "Is set, the clan name will show next to player names in the death notices.");

//ConVar cl_violent_ragdolls( "cl_violent_ragdolls", "1", FCVAR_RELEASE, "Allows ragdolls to bleed out and react to gun shots.");
#define USE_VIOLENT_RAGDOLLS 0
ConVar cl_violent_ragdolls( "cl_violent_ragdolls", "1", FCVAR_RELEASE, "Allows ragdolls to bleed out and react to gun shots.");

ConVar cl_dm_buyrandomweapons( "cl_dm_buyrandomweapons", "1", FCVAR_CLIENTDLL | FCVAR_RELEASE | FCVAR_ARCHIVE, "Player will automatically receive a random weapon on spawn in deathmatch if this is set to 1 (otherwise, they will receive the last weapon)" );

Expand Down Expand Up @@ -777,16 +776,16 @@ void C_CSRagdoll::ApplyRandomTaserForce( void )

void C_CSRagdoll::ImpactTrace( trace_t *pTrace, int iDamageType, const char *pCustomImpactName )
{

#if USE_VIOLENT_RAGDOLLS

static const float RAGDOLL_IMPACT_MAGNITUDE = 8000.0f;

IPhysicsObject *pPhysicsObject = VPhysicsGetObject();

if( !pPhysicsObject )
return;

if( !cl_violent_ragdolls.GetBool() )
return;

Vector dir = pTrace->endpos - pTrace->startpos;

if ( iDamageType == DMG_BLAST )
Expand Down Expand Up @@ -819,9 +818,6 @@ void C_CSRagdoll::ImpactTrace( trace_t *pTrace, int iDamageType, const char *pCu
}

m_pRagdoll->ResetRagdollSleepAfterTime();

#endif //USE_VIOLENT_RAGDOLLS

}

void C_CSRagdoll::ValidateModelIndex( void )
Expand Down Expand Up @@ -1049,9 +1045,9 @@ void C_CSRagdoll::CreateCSRagdoll()
const float boneDt = 0.05f;

bool bleedOut = false;
#if USE_VIOLENT_RAGDOLLS
bleedOut = ( pPlayer ? !pPlayer->m_bKilledByTaser : true );
#endif

if( cl_violent_ragdolls.GetBool() )
bleedOut = ( pPlayer ? !pPlayer->m_bKilledByTaser : true );

if ( pCachedRagdoll && pCachedRagdoll->nBones == GetModelPtr()->numbones() )
{
Expand Down
8 changes: 0 additions & 8 deletions game/client/ragdoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,21 +344,13 @@ void CRagdoll::ResetRagdollSleepAfterTime( void )
m_flAwakeTime = physenv->GetSimulationTime();
}

#define ALLOW_BLOOD_POOL 0

void CRagdoll::CreateBloodPool( void )
{

#if ALLOW_BLOOD_POOL

if ( m_doBleedOut )
{
DispatchParticleEffect( "blood_pool", GetRagdollOrigin(), QAngle( 0, 0, 0 ) );
m_doBleedOut = false;
}

#endif

}

void CRagdoll::DrawWireframe()
Expand Down

0 comments on commit 27f1476

Please sign in to comment.