u16 object;
float max_hear_distance;
bool loop;
+ float fade;
ServerSoundParams():
gain(1.0),
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;
struct ServerPlayingSound
{
ServerSoundParams params;
+ SimpleSoundSpec spec;
UNORDERED_SET<u16> clients; // peer ids
};
// Envlock
s32 playSound(const SimpleSoundSpec &spec, const ServerSoundParams ¶ms);
void stopSound(s32 handle);
+ void fadeSound(s32 handle, float step, float gain);
// Envlock
std::set<std::string> getPlayerEffectivePrivs(const std::string &name);
bool showFormspec(const char *name, const std::string &formspec, const std::string &formname);
Map & getMap() { return m_env->getMap(); }
ServerEnvironment & getEnv() { return *m_env; }
+ v3f findSpawnPos();
u32 hudAdd(RemotePlayer *player, HudElement *element);
bool hudRemove(RemotePlayer *player, u32 id);
bool setPlayerEyeOffset(RemotePlayer *player, v3f first, v3f third);
bool setSky(RemotePlayer *player, const video::SColor &bgcolor,
- const std::string &type, const std::vector<std::string> ¶ms);
+ const std::string &type, const std::vector<std::string> ¶ms,
+ bool &clouds);
+ bool setClouds(RemotePlayer *player, float density,
+ const video::SColor &color_bright,
+ const video::SColor &color_ambient,
+ float height,
+ float thickness,
+ const v2f &speed);
bool overrideDayNightRatio(RemotePlayer *player, bool do_override, float brightness);
void SendHUDSetFlags(u16 peer_id, u32 flags, u32 mask);
void SendHUDSetParam(u16 peer_id, u16 param, const std::string &value);
void SendSetSky(u16 peer_id, const video::SColor &bgcolor,
- const std::string &type, const std::vector<std::string> ¶ms);
+ const std::string &type, const std::vector<std::string> ¶ms,
+ bool &clouds);
+ void SendCloudParams(u16 peer_id, float density,
+ const video::SColor &color_bright,
+ const video::SColor &color_ambient,
+ float height,
+ float thickness,
+ const v2f &speed);
void SendOverrideDayNightRatio(u16 peer_id, bool do_override, float ratio);
/*
RemotePlayer *player = NULL);
void handleAdminChat(const ChatEventChat *evt);
- v3f findSpawnPos();
-
// When called, connection mutex should be locked
RemoteClient* getClient(u16 peer_id,ClientState state_min=CS_Active);
RemoteClient* getClientNoEx(u16 peer_id,ClientState state_min=CS_Active);