Increased ragdoll element limit from 24 to 32, reflecting later branches of Source

This commit is contained in:
Blixibon 2021-04-23 22:55:52 -05:00
parent 200001fdb9
commit 45ca64863a
3 changed files with 26 additions and 0 deletions

View File

@ -69,6 +69,16 @@ BEGIN_SIMPLE_DATADESC( CRagdoll )
DEFINE_RAGDOLL_ELEMENT( 21 ),
DEFINE_RAGDOLL_ELEMENT( 22 ),
DEFINE_RAGDOLL_ELEMENT( 23 ),
#ifdef MAPBASE
DEFINE_RAGDOLL_ELEMENT( 24 ),
DEFINE_RAGDOLL_ELEMENT( 25 ),
DEFINE_RAGDOLL_ELEMENT( 26 ),
DEFINE_RAGDOLL_ELEMENT( 27 ),
DEFINE_RAGDOLL_ELEMENT( 28 ),
DEFINE_RAGDOLL_ELEMENT( 29 ),
DEFINE_RAGDOLL_ELEMENT( 30 ),
DEFINE_RAGDOLL_ELEMENT( 31 ),
#endif
END_DATADESC()

View File

@ -159,6 +159,16 @@ BEGIN_DATADESC(CRagdollProp)
DEFINE_RAGDOLL_ELEMENT( 21 ),
DEFINE_RAGDOLL_ELEMENT( 22 ),
DEFINE_RAGDOLL_ELEMENT( 23 ),
#ifdef MAPBASE
DEFINE_RAGDOLL_ELEMENT( 24 ),
DEFINE_RAGDOLL_ELEMENT( 25 ),
DEFINE_RAGDOLL_ELEMENT( 26 ),
DEFINE_RAGDOLL_ELEMENT( 27 ),
DEFINE_RAGDOLL_ELEMENT( 28 ),
DEFINE_RAGDOLL_ELEMENT( 29 ),
DEFINE_RAGDOLL_ELEMENT( 30 ),
DEFINE_RAGDOLL_ELEMENT( 31 ),
#endif
END_DATADESC()
@ -191,8 +201,10 @@ void CRagdollProp::Spawn( void )
// Starts out as the default fade scale value
m_flDefaultFadeScale = m_flFadeScale;
#ifndef MAPBASE
// NOTE: If this fires, then the assert or the datadesc is wrong! (see DEFINE_RAGDOLL_ELEMENT above)
Assert( RAGDOLL_MAX_ELEMENTS == 24 );
#endif
Precache();
SetModel( STRING( GetModelName() ) );

View File

@ -27,7 +27,11 @@ class CBoneAccessor;
#include "bone_accessor.h"
// UNDONE: Remove and make dynamic?
#ifdef MAPBASE
#define RAGDOLL_MAX_ELEMENTS 32 // Mapbase boosts this limit to the level of later Source games.
#else
#define RAGDOLL_MAX_ELEMENTS 24
#endif
#define RAGDOLL_INDEX_BITS 5 // NOTE 1<<RAGDOLL_INDEX_BITS >= RAGDOLL_MAX_ELEMENTS
#define CORE_DISSOLVE_FADE_START 0.2f