Skip to content

Commit fa37adb

Browse files
committed
Fixed a few client-side VScript functions not binding correctly
1 parent a11cb93 commit fa37adb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

sp/src/game/client/c_baseanimating.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ BEGIN_ENT_SCRIPTDESC( C_BaseAnimating, C_BaseEntity, "Animating models client-si
302302
DEFINE_SCRIPTFUNC_NAMED( ScriptSetPoseParameter, "SetPoseParameter", "Set the specified pose parameter to the specified value" )
303303
DEFINE_SCRIPTFUNC( IsSequenceFinished, "Ask whether the main sequence is done playing" )
304304
#ifdef MAPBASE_VSCRIPT
305-
DEFINE_SCRIPTFUNC( LookupAttachment, "Get the named attachement id" )
305+
DEFINE_SCRIPTFUNC_NAMED( ScriptLookupAttachment, "LookupAttachment", "Get the named attachement id" )
306306
DEFINE_SCRIPTFUNC_NAMED( ScriptGetAttachmentOrigin, "GetAttachmentOrigin", "Get the attachement id's origin vector" )
307307
DEFINE_SCRIPTFUNC_NAMED( ScriptGetAttachmentAngles, "GetAttachmentAngles", "Get the attachement id's angles as a p,y,r vector" )
308308
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
332332
DEFINE_SCRIPTFUNC( SetPlaybackRate, "" )
333333
DEFINE_SCRIPTFUNC( GetCycle, "" )
334334
DEFINE_SCRIPTFUNC( SetCycle, "" )
335-
DEFINE_SCRIPTFUNC( GetSkin, "Gets the model's skin" )
335+
DEFINE_SCRIPTFUNC_NAMED( ScriptGetSkin, "GetSkin", "Gets the model's skin" )
336336
DEFINE_SCRIPTFUNC( SetSkin, "Sets the model's skin" )
337337

338338
DEFINE_SCRIPTFUNC( GetForceBone, "Gets the entity's force bone, which is used to determine which bone a ragdoll should apply its force to." )

sp/src/game/client/c_baseanimating.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ class C_BaseAnimating : public C_BaseEntity, private IModelLoadCallback
454454
virtual bool IsViewModel() const;
455455

456456
#ifdef MAPBASE_VSCRIPT
457+
int ScriptLookupAttachment( const char *pAttachmentName ) { return LookupAttachment( pAttachmentName ); }
457458
const Vector& ScriptGetAttachmentOrigin(int iAttachment);
458459
const Vector& ScriptGetAttachmentAngles(int iAttachment);
459460
HSCRIPT ScriptGetAttachmentMatrix(int iAttachment);
@@ -465,6 +466,7 @@ class C_BaseAnimating : public C_BaseEntity, private IModelLoadCallback
465466
int ScriptSelectWeightedSequence( int activity ) { return SelectWeightedSequence( (Activity)activity ); }
466467

467468
// For VScript
469+
int ScriptGetSkin() { return GetSkin(); }
468470
void SetSkin( int iSkin ) { m_nSkin = iSkin; }
469471

470472
int GetForceBone() { return m_nForceBone; }

0 commit comments

Comments
 (0)