summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorRui <rui.minetest@gmail.com>2017-06-11 20:58:26 +0900
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-06-11 13:58:26 +0200
commitff73c7a5da6ab8ac0bb678ebf25b83e805397029 (patch)
tree1e91e8226000250c4636bbb188330d105c85d019 /src/server.h
parent03ff53e16bafe1aaa278625864c546a525d08dfc (diff)
downloadminetest-ff73c7a5da6ab8ac0bb678ebf25b83e805397029.tar.gz
minetest-ff73c7a5da6ab8ac0bb678ebf25b83e805397029.tar.bz2
minetest-ff73c7a5da6ab8ac0bb678ebf25b83e805397029.zip
Sound: Add pitch option (#5960)
* Sound: Add pitch option
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h36
1 files changed, 13 insertions, 23 deletions
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;
};