From ff73c7a5da6ab8ac0bb678ebf25b83e805397029 Mon Sep 17 00:00:00 2001 From: Rui Date: Sun, 11 Jun 2017 20:58:26 +0900 Subject: Sound: Add pitch option (#5960) * Sound: Add pitch option --- src/server.h | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h index 0ad5dd97a..3086e8762 100644 --- a/src/server.h +++ b/src/server.h @@ -104,29 +104,19 @@ struct MediaInfo struct ServerSoundParams { - float gain; - std::string to_player; - enum Type{ - SSP_LOCAL=0, - SSP_POSITIONAL=1, - SSP_OBJECT=2 - } type; - v3f pos; - u16 object; - float max_hear_distance; - bool loop; - float fade; - - ServerSoundParams(): - gain(1.0), - to_player(""), - type(SSP_LOCAL), - pos(0,0,0), - object(0), - max_hear_distance(32*BS), - loop(false), - fade(0) - {} + enum Type { + SSP_LOCAL, + SSP_POSITIONAL, + SSP_OBJECT + } type = SSP_LOCAL; + float gain = 1.0f; + float fade = 0.0f; + float pitch = 1.0f; + bool loop = false; + float max_hear_distance = 32*BS; + v3f pos = v3f(0, 0, 0); + u16 object = 0; + std::string to_player = ""; v3f getPos(ServerEnvironment *env, bool *pos_exists) const; }; -- cgit v1.2.3