mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02: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:
@@ -99,11 +99,7 @@ struct MediaInfo
|
||||
// Combines the pure sound (SimpleSoundSpec) with positional information
|
||||
struct ServerPlayingSound
|
||||
{
|
||||
enum Type {
|
||||
SSP_LOCAL,
|
||||
SSP_POSITIONAL,
|
||||
SSP_OBJECT
|
||||
} type = SSP_LOCAL;
|
||||
SoundLocation type = SoundLocation::Local;
|
||||
|
||||
float gain = 1.0f; // for amplification of the base sound
|
||||
float max_hear_distance = 32 * BS;
|
||||
|
Reference in New Issue
Block a user