mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Added spawnflag to make prop_ragdoll bones use constraints which are fixed to each other (also known as "make statue")
This commit is contained in:
@@ -174,6 +174,10 @@ void RagdollSetupAnimatedFriction( IPhysicsEnvironment *pPhysEnv, ragdoll_t *rag
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
ConVar g_ragdoll_fixed_constraints_mass( "g_ragdoll_fixed_constraints_mass", "1000", FCVAR_REPLICATED );
|
||||
#endif
|
||||
|
||||
static void RagdollAddSolid( IPhysicsEnvironment *pPhysEnv, ragdoll_t &ragdoll, const ragdollparams_t ¶ms, solid_t &solid )
|
||||
{
|
||||
if ( solid.index >= 0 && solid.index < params.pCollide->solidCount)
|
||||
@@ -186,7 +190,12 @@ static void RagdollAddSolid( IPhysicsEnvironment *pPhysEnv, ragdoll_t &ragdoll,
|
||||
{
|
||||
if ( params.fixedConstraints )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if (g_ragdoll_fixed_constraints_mass.GetFloat() != -1)
|
||||
solid.params.mass = g_ragdoll_fixed_constraints_mass.GetFloat();
|
||||
#else
|
||||
solid.params.mass = 1000.f;
|
||||
#endif
|
||||
}
|
||||
|
||||
solid.params.rotInertiaLimit = 0.1;
|
||||
|
||||
Reference in New Issue
Block a user