Merge pull request #37 from Rasikh-Qadeer/Update

Added PlaySoundForWorld
This commit is contained in:
Sandu Liviu Catalin authored and GitHub committed 2018-09-08 11:00:26 +03:00
commit 976d1f4442
3 files changed
+16

No files matched your search

+9
View File
@@ -626,6 +626,15 @@ void PlaySoundEx(Int32 world, Int32 sound, Float32 x, Float32 y, Float32 z)
} }
} }
// ------------------------------------------------------------------------------------------------
void PlaySoundForWorld(Int32 world, Int32 sound)
{
if (_Func->PlaySound(world, sound, NAN, NAN, NAN) == vcmpErrorArgumentOutOfBounds)
{
STHROWF("Argument value out of bounds");
}
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void HideMapObject(Int32 model, const Vector3 & pos) void HideMapObject(Int32 model, const Vector3 & pos)
{ {
+5
View File
@@ -318,6 +318,11 @@ void PlaySound(Int32 world, Int32 sound, const Vector3 & pos);
*/ */
void PlaySoundEx(Int32 world, Int32 sound, Float32 x, Float32 y, Float32 z); void PlaySoundEx(Int32 world, Int32 sound, Float32 x, Float32 y, Float32 z);
/* ------------------------------------------------------------------------------------------------
* Play a game sound to a specific world.
*/
void PlaySoundForWorld(Int32 world, Int32 sound);
/* ------------------------------------------------------------------------------------------------ /* ------------------------------------------------------------------------------------------------
* Make a map object invisible. * Make a map object invisible.
*/ */
+2
View File
@@ -90,6 +90,7 @@ void Register_Misc(HSQUIRRELVM vm)
.Func(_SC("CreateExplosionEx"), &CreateExplosionEx) .Func(_SC("CreateExplosionEx"), &CreateExplosionEx)
.Func(_SC("PlaySound"), &PlaySound) .Func(_SC("PlaySound"), &PlaySound)
.Func(_SC("PlaySoundEx"), &PlaySoundEx) .Func(_SC("PlaySoundEx"), &PlaySoundEx)
.Func(_SC("PlaySoundForWorld"), &PlaySoundForWorld)
.Func(_SC("HideMapObject"), &HideMapObject) .Func(_SC("HideMapObject"), &HideMapObject)
.Func(_SC("HideMapObjectEx"), &HideMapObjectEx) .Func(_SC("HideMapObjectEx"), &HideMapObjectEx)
.Func(_SC("HideMapObjectRaw"), &HideMapObjectRaw) .Func(_SC("HideMapObjectRaw"), &HideMapObjectRaw)
@@ -151,6 +152,7 @@ void Register_Misc(HSQUIRRELVM vm)
.Func(_SC("IsWeaponNatural"), &IsWeaponNatural) .Func(_SC("IsWeaponNatural"), &IsWeaponNatural)
.Func(_SC("PlaySound"), &PlaySound) .Func(_SC("PlaySound"), &PlaySound)
.Func(_SC("PlaySoundEx"), &PlaySoundEx) .Func(_SC("PlaySoundEx"), &PlaySoundEx)
.Func(_SC("PlaySoundForWorld"), &PlaySoundForWorld)
.Func(_SC("CreateExplosion"), &CreateExplosion) .Func(_SC("CreateExplosion"), &CreateExplosion)
.Func(_SC("CreateExplosionEx"), &CreateExplosionEx); .Func(_SC("CreateExplosionEx"), &CreateExplosionEx);