aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/c_ai_basenpc.cpp
diff options
context:
space:
mode:
authorJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
committerJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
commit0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch)
treec831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/game/client/c_ai_basenpc.cpp
parentUpdated the SDK with the latest code from the TF and HL2 branches. (diff)
downloadsource-sdk-2013-master.tar.xz
source-sdk-2013-master.zip
Updated the SDK with the latest code from the TF and HL2 branches.HEADmaster
Diffstat (limited to 'mp/src/game/client/c_ai_basenpc.cpp')
-rw-r--r--mp/src/game/client/c_ai_basenpc.cpp16
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;
}