mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-03-03 17:25:27 +03:00
Fix ScriptGetAttachmentMatrix/Angles
This commit is contained in:
parent
2fd480704c
commit
da45be6eb5
@ -1531,35 +1531,32 @@ float C_BaseAnimating::ClampCycle( float flCycle, bool isLooping )
|
||||
//-----------------------------------------------------------------------------
|
||||
const Vector& C_BaseAnimating::ScriptGetAttachmentOrigin( int iAttachment )
|
||||
{
|
||||
|
||||
static Vector absOrigin;
|
||||
static QAngle qa;
|
||||
QAngle qa;
|
||||
|
||||
C_BaseAnimating::GetAttachment( iAttachment, absOrigin, qa );
|
||||
|
||||
return absOrigin;
|
||||
}
|
||||
|
||||
const Vector& C_BaseAnimating::ScriptGetAttachmentAngles( int iAttachment )
|
||||
const QAngle& C_BaseAnimating::ScriptGetAttachmentAngles( int iAttachment )
|
||||
{
|
||||
|
||||
static Vector absOrigin;
|
||||
static Vector absAngles;
|
||||
static QAngle qa;
|
||||
Vector absOrigin;
|
||||
|
||||
C_BaseAnimating::GetAttachment( iAttachment, absOrigin, qa );
|
||||
absAngles.x = qa.x;
|
||||
absAngles.y = qa.y;
|
||||
absAngles.z = qa.z;
|
||||
return absAngles;
|
||||
return qa;
|
||||
}
|
||||
|
||||
HSCRIPT C_BaseAnimating::ScriptGetAttachmentMatrix( int iAttachment )
|
||||
HSCRIPT_RC C_BaseAnimating::ScriptGetAttachmentMatrix( int iAttachment )
|
||||
{
|
||||
static matrix3x4_t matrix;
|
||||
matrix3x4_t *matrix = new matrix3x4_t;
|
||||
|
||||
C_BaseAnimating::GetAttachment( iAttachment, matrix );
|
||||
return g_pScriptVM->RegisterInstance( &matrix );
|
||||
if ( C_BaseAnimating::GetAttachment( iAttachment, *matrix ) )
|
||||
return g_pScriptVM->RegisterInstance( matrix, true );
|
||||
|
||||
delete matrix;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void C_BaseAnimating::ScriptGetBoneTransform( int iBone, HSCRIPT hTransform )
|
||||
|
@ -464,8 +464,8 @@ public:
|
||||
#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);
|
||||
const QAngle& ScriptGetAttachmentAngles(int iAttachment);
|
||||
HSCRIPT_RC ScriptGetAttachmentMatrix(int iAttachment);
|
||||
|
||||
void ScriptGetBoneTransform( int iBone, HSCRIPT hTransform );
|
||||
void ScriptSetBoneTransform( int iBone, HSCRIPT hTransform );
|
||||
|
Loading…
x
Reference in New Issue
Block a user