From fa37adb1d552e9d4de17b600c3208f1311607b1f Mon Sep 17 00:00:00 2001 From: Blixibon Date: Tue, 26 Jan 2021 12:13:04 -0600 Subject: [PATCH] Fixed a few client-side VScript functions not binding correctly --- sp/src/game/client/c_baseanimating.cpp | 4 ++-- sp/src/game/client/c_baseanimating.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sp/src/game/client/c_baseanimating.cpp b/sp/src/game/client/c_baseanimating.cpp index 660c18b4..f9b6486c 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -302,7 +302,7 @@ BEGIN_ENT_SCRIPTDESC( C_BaseAnimating, C_BaseEntity, "Animating models client-si 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" ) #ifdef MAPBASE_VSCRIPT - DEFINE_SCRIPTFUNC( LookupAttachment, "Get the named attachement id" ) + DEFINE_SCRIPTFUNC_NAMED( ScriptLookupAttachment, "LookupAttachment", "Get the named attachement id" ) DEFINE_SCRIPTFUNC_NAMED( ScriptGetAttachmentOrigin, "GetAttachmentOrigin", "Get the attachement id's origin vector" ) DEFINE_SCRIPTFUNC_NAMED( ScriptGetAttachmentAngles, "GetAttachmentAngles", "Get the attachement id's angles as a p,y,r vector" ) DEFINE_SCRIPTFUNC_NAMED( ScriptGetAttachmentMatrix, "GetAttachmentMatrix", "Get the attachement id's matrix transform" ) @@ -332,7 +332,7 @@ BEGIN_ENT_SCRIPTDESC( C_BaseAnimating, C_BaseEntity, "Animating models client-si DEFINE_SCRIPTFUNC( SetPlaybackRate, "" ) DEFINE_SCRIPTFUNC( GetCycle, "" ) DEFINE_SCRIPTFUNC( SetCycle, "" ) - DEFINE_SCRIPTFUNC( GetSkin, "Gets the model's skin" ) + DEFINE_SCRIPTFUNC_NAMED( ScriptGetSkin, "GetSkin", "Gets the model's skin" ) DEFINE_SCRIPTFUNC( SetSkin, "Sets the model's skin" ) DEFINE_SCRIPTFUNC( GetForceBone, "Gets the entity's force bone, which is used to determine which bone a ragdoll should apply its force to." ) diff --git a/sp/src/game/client/c_baseanimating.h b/sp/src/game/client/c_baseanimating.h index 2c240a06..6f48ac1a 100644 --- a/sp/src/game/client/c_baseanimating.h +++ b/sp/src/game/client/c_baseanimating.h @@ -454,6 +454,7 @@ public: virtual bool IsViewModel() const; #ifdef MAPBASE_VSCRIPT + int ScriptLookupAttachment( const char *pAttachmentName ) { return LookupAttachment( pAttachmentName ); } const Vector& ScriptGetAttachmentOrigin(int iAttachment); const Vector& ScriptGetAttachmentAngles(int iAttachment); HSCRIPT ScriptGetAttachmentMatrix(int iAttachment); @@ -465,6 +466,7 @@ public: int ScriptSelectWeightedSequence( int activity ) { return SelectWeightedSequence( (Activity)activity ); } // For VScript + int ScriptGetSkin() { return GetSkin(); } void SetSkin( int iSkin ) { m_nSkin = iSkin; } int GetForceBone() { return m_nForceBone; }