Fixed issue with EmitSound_t origin in VScript

This commit is contained in:
Blixibon 2021-09-19 21:03:36 -05:00
parent 62f4d6f872
commit 5896fb73c8
2 changed files with 6 additions and 2 deletions

View File

@ -584,8 +584,10 @@ BEGIN_SCRIPTDESC_ROOT_NAMED( ScriptEmitSound_t, "EmitSound_t", "Handle for acces
DEFINE_SCRIPTFUNC( GetSpecialDSP, "Gets the sound's special DSP setting." ) DEFINE_SCRIPTFUNC( GetSpecialDSP, "Gets the sound's special DSP setting." )
DEFINE_SCRIPTFUNC( SetSpecialDSP, "Sets the sound's special DSP setting." ) DEFINE_SCRIPTFUNC( SetSpecialDSP, "Sets the sound's special DSP setting." )
DEFINE_SCRIPTFUNC( HasOrigin, "Returns true if the sound has an origin override." )
DEFINE_SCRIPTFUNC( GetOrigin, "Gets the sound's origin override." ) DEFINE_SCRIPTFUNC( GetOrigin, "Gets the sound's origin override." )
DEFINE_SCRIPTFUNC( SetOrigin, "Sets the sound's origin override." ) DEFINE_SCRIPTFUNC( SetOrigin, "Sets the sound's origin override." )
DEFINE_SCRIPTFUNC( ClearOrigin, "Clears the sound's origin override if it has one." )
DEFINE_SCRIPTFUNC( GetSoundTime, "Gets the time the sound will begin, relative to Time()." ) DEFINE_SCRIPTFUNC( GetSoundTime, "Gets the time the sound will begin, relative to Time()." )
DEFINE_SCRIPTFUNC( SetSoundTime, "Sets the time the sound will begin, relative to Time()." ) DEFINE_SCRIPTFUNC( SetSoundTime, "Sets the time the sound will begin, relative to Time()." )

View File

@ -153,8 +153,10 @@ struct ScriptEmitSound_t : public EmitSound_t
int GetSpecialDSP() { return m_nSpecialDSP; } int GetSpecialDSP() { return m_nSpecialDSP; }
void SetSpecialDSP( int nSpecialDSP ) { m_nSpecialDSP = nSpecialDSP; } void SetSpecialDSP( int nSpecialDSP ) { m_nSpecialDSP = nSpecialDSP; }
ScriptVariant_t GetOrigin() { return m_pOrigin ? *m_pOrigin : ScriptVariant_t(); } bool HasOrigin() { return m_pOrigin ? true : false; }
void SetOrigin( ScriptVariant_t origin ) { m_pOrigin = origin.m_pVector; } const Vector &GetOrigin() { return m_pOrigin ? *m_pOrigin : vec3_origin; }
void SetOrigin( Vector origin ) { m_pOrigin = &origin; }
void ClearOrigin() { m_pOrigin = NULL; }
float GetSoundTime() { return m_flSoundTime; } float GetSoundTime() { return m_flSoundTime; }
void SetSoundTime( float flSoundTime ) { m_flSoundTime = flSoundTime; } void SetSoundTime( float flSoundTime ) { m_flSoundTime = flSoundTime; }