mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
add source-sdk-2013
This commit is contained in:
+15
-16
@@ -72,7 +72,6 @@ BEGIN_SIMPLE_DATADESC( CRagdoll )
|
||||
|
||||
END_DATADESC()
|
||||
|
||||
|
||||
IPhysicsObject *CRagdoll::GetElement( int elementNum )
|
||||
{
|
||||
return m_ragdoll.list[elementNum].pObject;
|
||||
@@ -586,20 +585,20 @@ void C_ServerRagdoll::BuildTransformations( CStudioHdr *hdr, Vector *pos, Quater
|
||||
int i;
|
||||
for ( i = 0; i < m_elementCount; i++ )
|
||||
{
|
||||
int iBone = m_boneIndex[i];
|
||||
if ( iBone >= 0 )
|
||||
int index = m_boneIndex[i];
|
||||
if ( index >= 0 )
|
||||
{
|
||||
if ( hdr->boneFlags( iBone ) & boneMask )
|
||||
if ( hdr->boneFlags(index) & boneMask )
|
||||
{
|
||||
boneSimulated[iBone] = true;
|
||||
matrix3x4_t &matrix = GetBoneForWrite( iBone );
|
||||
boneSimulated[index] = true;
|
||||
matrix3x4_t &matrix = GetBoneForWrite( index );
|
||||
|
||||
if ( m_flBlendWeightCurrent != 0.0f && pSeqDesc &&
|
||||
// FIXME: this bone access is illegal
|
||||
pSeqDesc->weight( iBone ) != 0.0f )
|
||||
pSeqDesc->weight( index ) != 0.0f )
|
||||
{
|
||||
// Use the animated bone position instead
|
||||
boneSimulated[iBone] = false;
|
||||
boneSimulated[index] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -703,8 +702,8 @@ public:
|
||||
if ( GetMoveParent() )
|
||||
{
|
||||
// HACKHACK: Force the attached bone to be set up
|
||||
int iBone = m_boneIndex[m_ragdollAttachedObjectIndex];
|
||||
int boneFlags = GetModelPtr()->boneFlags( iBone );
|
||||
int index = m_boneIndex[m_ragdollAttachedObjectIndex];
|
||||
int boneFlags = GetModelPtr()->boneFlags(index);
|
||||
if ( !(boneFlags & boneMask) )
|
||||
{
|
||||
// BUGBUG: The attached bone is required and this call is going to skip it, so force it
|
||||
@@ -745,8 +744,8 @@ public:
|
||||
|
||||
if ( parent )
|
||||
{
|
||||
int iBone = m_boneIndex[m_ragdollAttachedObjectIndex];
|
||||
const matrix3x4_t &matrix = GetBone( iBone );
|
||||
int index = m_boneIndex[m_ragdollAttachedObjectIndex];
|
||||
const matrix3x4_t &matrix = GetBone( index );
|
||||
Vector ragOrigin;
|
||||
VectorTransform( m_attachmentPointRagdollSpace, matrix, ragOrigin );
|
||||
offset = worldOrigin - ragOrigin;
|
||||
@@ -760,11 +759,11 @@ public:
|
||||
if ( !( hdr->boneFlags( i ) & boneMask ) )
|
||||
continue;
|
||||
|
||||
Vector vPos;
|
||||
Vector pos;
|
||||
matrix3x4_t &matrix = GetBoneForWrite( i );
|
||||
MatrixGetColumn( matrix, 3, vPos );
|
||||
vPos += offset;
|
||||
MatrixSetColumn( vPos, 3, matrix );
|
||||
MatrixGetColumn( matrix, 3, pos );
|
||||
pos += offset;
|
||||
MatrixSetColumn( pos, 3, matrix );
|
||||
}
|
||||
}
|
||||
void OnDataChanged( DataUpdateType_t updateType );
|
||||
|
||||
Reference in New Issue
Block a user