summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorBrandon <brandon@bremaweb.com>2016-07-10 00:08:26 -0500
committerparamat <mat.gregory@virginmedia.com>2017-05-03 03:12:45 +0100
commitbd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2 (patch)
tree55f92cc02fce2acc9bb041a34de3c474b894bd00 /src/server.h
parentf1d7a26b7c341b468f34325cec5c3d495f175a8f (diff)
downloadminetest-bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2.tar.gz
minetest-bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2.tar.bz2
minetest-bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2.zip
Sound API: Add fading sounds
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h
index 3a082b9a4..5e6211637 100644
--- a/src/server.h
+++ b/src/server.h
@@ -115,6 +115,7 @@ struct ServerSoundParams
u16 object;
float max_hear_distance;
bool loop;
+ float fade;
ServerSoundParams():
gain(1.0),
@@ -123,7 +124,8 @@ struct ServerSoundParams
pos(0,0,0),
object(0),
max_hear_distance(32*BS),
- loop(false)
+ loop(false),
+ fade(0)
{}
v3f getPos(ServerEnvironment *env, bool *pos_exists) const;
@@ -132,6 +134,7 @@ struct ServerSoundParams
struct ServerPlayingSound
{
ServerSoundParams params;
+ SimpleSoundSpec spec;
UNORDERED_SET<u16> clients; // peer ids
};
@@ -231,6 +234,7 @@ public:
// Envlock
s32 playSound(const SimpleSoundSpec &spec, const ServerSoundParams &params);
void stopSound(s32 handle);
+ void fadeSound(s32 handle, float step, float gain);
// Envlock
std::set<std::string> getPlayerEffectivePrivs(const std::string &name);