diff options
Diffstat (limited to 'mp/src/game/client/c_ai_basenpc.cpp')
| -rw-r--r-- | mp/src/game/client/c_ai_basenpc.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mp/src/game/client/c_ai_basenpc.cpp b/mp/src/game/client/c_ai_basenpc.cpp index 1b1e2e65..69b675b3 100644 --- a/mp/src/game/client/c_ai_basenpc.cpp +++ b/mp/src/game/client/c_ai_basenpc.cpp @@ -153,9 +153,13 @@ void C_AI_BaseNPC::OnDataChanged( DataUpdateType_t type ) } } -void C_AI_BaseNPC::GetRagdollInitBoneArrays( matrix3x4_t *pDeltaBones0, matrix3x4_t *pDeltaBones1, matrix3x4_t *pCurrentBones, float boneDt ) +bool C_AI_BaseNPC::GetRagdollInitBoneArrays( matrix3x4_t *pDeltaBones0, matrix3x4_t *pDeltaBones1, matrix3x4_t *pCurrentBones, float boneDt ) { - ForceSetupBonesAtTime( pDeltaBones0, gpGlobals->curtime - boneDt ); + bool bRet = true; + + if ( !ForceSetupBonesAtTime( pDeltaBones0, gpGlobals->curtime - boneDt ) ) + bRet = false; + GetRagdollCurSequenceWithDeathPose( this, pDeltaBones1, gpGlobals->curtime, m_iDeathPose, m_iDeathFrame ); float ragdollCreateTime = PhysGetSyncCreateTime(); if ( ragdollCreateTime != gpGlobals->curtime ) @@ -164,11 +168,15 @@ void C_AI_BaseNPC::GetRagdollInitBoneArrays( matrix3x4_t *pDeltaBones0, matrix3x // so initialize the ragdoll at that time so that it will reach the current // position at curtime. Otherwise the ragdoll will simulate forward from curtime // and pop into the future a bit at this point of transition - ForceSetupBonesAtTime( pCurrentBones, ragdollCreateTime ); + if ( !ForceSetupBonesAtTime( pCurrentBones, ragdollCreateTime ) ) + bRet = false; } else { - SetupBones( pCurrentBones, MAXSTUDIOBONES, BONE_USED_BY_ANYTHING, gpGlobals->curtime ); + if ( !SetupBones( pCurrentBones, MAXSTUDIOBONES, BONE_USED_BY_ANYTHING, gpGlobals->curtime ) ) + bRet = false; } + + return bRet; } |