mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
051181fa6e
commit
e51f474613
9 changed files with 112 additions and 108 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue