mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-22 04:37:13 +01:00
Add a method to the player class that plays a sound which follows the player character.
This commit is contained in:
parent
e6213d0932
commit
933522f2a4
@ -1192,6 +1192,15 @@ void CPlayer::Redirect(CSStr ip, Uint32 port, CSStr nick, CSStr server_pass, CSS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CPlayer::PlaySound(Int32 sound_id) const
|
||||||
|
{
|
||||||
|
// Validate the managed identifier
|
||||||
|
Validate();
|
||||||
|
// Perform the requested operation
|
||||||
|
_Func->PlaySound(_Func->GetPlayerUniqueWorld(m_ID), sound_id, NAN, NAN, NAN);
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
Int32 CPlayer::GetAuthority() const
|
Int32 CPlayer::GetAuthority() const
|
||||||
{
|
{
|
||||||
@ -2287,6 +2296,7 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
||||||
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
||||||
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
||||||
|
.Func(_SC("PlaySound"), &CPlayer::PlaySound)
|
||||||
.Func(_SC("GetMsgPrefix"), &CPlayer::GetMessagePrefix)
|
.Func(_SC("GetMsgPrefix"), &CPlayer::GetMessagePrefix)
|
||||||
.Func(_SC("SetMsgPrefix"), &CPlayer::SetMessagePrefix)
|
.Func(_SC("SetMsgPrefix"), &CPlayer::SetMessagePrefix)
|
||||||
.Func(_SC("StreamByte"), &CPlayer::StreamByte)
|
.Func(_SC("StreamByte"), &CPlayer::StreamByte)
|
||||||
|
@ -705,6 +705,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Redirect(CSStr ip, Uint32 port, CSStr nick, CSStr server_pass, CSStr user_pass);
|
void Redirect(CSStr ip, Uint32 port, CSStr nick, CSStr server_pass, CSStr user_pass);
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
* Retrieve the authority level of the managed player entity.
|
||||||
|
*/
|
||||||
|
void PlaySound(Int32 sound_id) const;
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Retrieve the authority level of the managed player entity.
|
* Retrieve the authority level of the managed player entity.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user