mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
Integrating vscript interface code (based on Alien Swarm)
This commit is contained in:
@@ -281,6 +281,11 @@ BEGIN_DATADESC( C_ClientRagdoll )
|
||||
|
||||
END_DATADESC()
|
||||
|
||||
BEGIN_ENT_SCRIPTDESC( C_BaseAnimating, C_BaseEntity, "Animating models client-side" )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptSetPoseParameter, "SetPoseParameter", "Set the specified pose parameter to the specified value" )
|
||||
DEFINE_SCRIPTFUNC( IsSequenceFinished, "Ask whether the main sequence is done playing" )
|
||||
END_SCRIPTDESC();
|
||||
|
||||
C_ClientRagdoll::C_ClientRagdoll( bool bRestoring )
|
||||
{
|
||||
m_iCurrentFriction = 0;
|
||||
@@ -1403,6 +1408,15 @@ float C_BaseAnimating::ClampCycle( float flCycle, bool isLooping )
|
||||
return flCycle;
|
||||
}
|
||||
|
||||
void C_BaseAnimating::ScriptSetPoseParameter(const char* szName, float fValue)
|
||||
{
|
||||
CStudioHdr* pHdr = GetModelPtr();
|
||||
if (pHdr == NULL)
|
||||
return;
|
||||
|
||||
int iPoseParam = LookupPoseParameter(pHdr, szName);
|
||||
SetPoseParameter(pHdr, iPoseParam, fValue);
|
||||
}
|
||||
|
||||
void C_BaseAnimating::GetCachedBoneMatrix( int boneIndex, matrix3x4_t &out )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user