From e51f474613c5d4bd53a8d213785bcb51f5cf447f Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 9 Jul 2022 22:32:24 +0200 Subject: Sounds: Various little improvements (#12486) Use SimpleSoundSpec where reasonable (OpenAL) Ensure the sound IDs do not underflow or get overwritten -> loop in u16 Proper use of an enum. --- src/script/common/c_content.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/common') diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 1f9f97781..5595f3b14 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -1056,7 +1056,7 @@ void read_server_sound_params(lua_State *L, int index, if(!lua_isnil(L, -1)){ v3f p = read_v3f(L, -1)*BS; params.pos = p; - params.type = ServerPlayingSound::SSP_POSITIONAL; + params.type = SoundLocation::Position; } lua_pop(L, 1); lua_getfield(L, index, "object"); @@ -1065,7 +1065,7 @@ void read_server_sound_params(lua_State *L, int index, ServerActiveObject *sao = ObjectRef::getobject(ref); if(sao){ params.object = sao->getId(); - params.type = ServerPlayingSound::SSP_OBJECT; + params.type = SoundLocation::Object; } } lua_pop(L, 1); -- cgit v1.2.3