diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2022-07-09 22:32:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 22:32:24 +0200 |
commit | e51f474613c5d4bd53a8d213785bcb51f5cf447f (patch) | |
tree | 1278a6dbf5e9507ed97a4ed66afcbcb71da3639d /src/script/common/c_content.cpp | |
parent | 051181fa6ee00d8379e8a7dc7442b58342d4352b (diff) | |
download | minetest-e51f474613c5d4bd53a8d213785bcb51f5cf447f.tar.gz minetest-e51f474613c5d4bd53a8d213785bcb51f5cf447f.tar.bz2 minetest-e51f474613c5d4bd53a8d213785bcb51f5cf447f.zip |
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.
Diffstat (limited to 'src/script/common/c_content.cpp')
-rw-r--r-- | src/script/common/c_content.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |