diff options
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/server.h b/src/server.h index d61840871..680de57b5 100644 --- a/src/server.h +++ b/src/server.h @@ -61,6 +61,10 @@ class ServerScripting; class ServerEnvironment; struct SimpleSoundSpec; struct CloudParams; +struct SkyboxParams; +struct SunParams; +struct MoonParams; +struct StarParams; class ServerThread; class ServerModManager; @@ -98,6 +102,7 @@ struct ServerSoundParams v3f pos; u16 object = 0; std::string to_player = ""; + std::string exclude_player = ""; v3f getPos(ServerEnvironment *env, bool *pos_exists) const; }; @@ -209,7 +214,8 @@ public: // Returns -1 if failed, sound handle on success // Envlock - s32 playSound(const SimpleSoundSpec &spec, const ServerSoundParams ¶ms); + s32 playSound(const SimpleSoundSpec &spec, const ServerSoundParams ¶ms, + bool ephemeral=false); void stopSound(s32 handle); void fadeSound(s32 handle, float step, float gain); @@ -305,9 +311,11 @@ public: f32 frame_speed); void setPlayerEyeOffset(RemotePlayer *player, const v3f &first, const v3f &third); - void setSky(RemotePlayer *player, const video::SColor &bgcolor, - const std::string &type, const std::vector<std::string> ¶ms, - bool &clouds); + void setSky(RemotePlayer *player, const SkyboxParams ¶ms); + void setSun(RemotePlayer *player, const SunParams ¶ms); + void setMoon(RemotePlayer *player, const MoonParams ¶ms); + void setStars(RemotePlayer *player, const StarParams ¶ms); + void setClouds(RemotePlayer *player, const CloudParams ¶ms); bool overrideDayNightRatio(RemotePlayer *player, bool do_override, float brightness); @@ -411,9 +419,10 @@ private: void SendHUDChange(session_t peer_id, u32 id, HudElementStat stat, void *value); void SendHUDSetFlags(session_t peer_id, u32 flags, u32 mask); void SendHUDSetParam(session_t peer_id, u16 param, const std::string &value); - void SendSetSky(session_t peer_id, const video::SColor &bgcolor, - const std::string &type, const std::vector<std::string> ¶ms, - bool &clouds); + void SendSetSky(session_t peer_id, const SkyboxParams ¶ms); + void SendSetSun(session_t peer_id, const SunParams ¶ms); + void SendSetMoon(session_t peer_id, const MoonParams ¶ms); + void SendSetStars(session_t peer_id, const StarParams ¶ms); void SendCloudParams(session_t peer_id, const CloudParams ¶ms); void SendOverrideDayNightRatio(session_t peer_id, bool do_override, float ratio); void broadcastModChannelMessage(const std::string &channel, @@ -646,7 +655,8 @@ private: Sounds */ std::unordered_map<s32, ServerPlayingSound> m_playing_sounds; - s32 m_next_sound_id = 0; + s32 m_next_sound_id = 0; // positive values only + s32 nextSoundId(); /* Detached inventories (behind m_env_mutex) |