From bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 10 Jul 2016 00:08:26 -0500 Subject: Sound API: Add fading sounds --- src/server.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server.h') 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 clients; // peer ids }; @@ -231,6 +234,7 @@ public: // Envlock s32 playSound(const SimpleSoundSpec &spec, const ServerSoundParams ¶ms); void stopSound(s32 handle); + void fadeSound(s32 handle, float step, float gain); // Envlock std::set getPlayerEffectivePrivs(const std::string &name); -- cgit v1.2.3