class ServerScripting;
class ServerEnvironment;
struct SimpleSoundSpec;
+struct CloudParams;
class ServerThread;
+class ServerModManager;
enum ClientDeletionReason {
CDR_LEAVE,
NodeDefManager* getWritableNodeDefManager();
IWritableCraftDefManager* getWritableCraftDefManager();
- virtual const std::vector<ModSpec> &getMods() const { return m_mods; }
+ virtual const std::vector<ModSpec> &getMods() const;
virtual const ModSpec* getModSpec(const std::string &modname) const;
void getModNames(std::vector<std::string> &modlist);
std::string getBuiltinLuaPath();
bool hudSetFlags(RemotePlayer *player, u32 flags, u32 mask);
bool hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount);
void hudSetHotbarImage(RemotePlayer *player, std::string name);
- std::string hudGetHotbarImage(RemotePlayer *player);
void hudSetHotbarSelectedImage(RemotePlayer *player, std::string name);
- const std::string &hudGetHotbarSelectedImage(RemotePlayer *player) const;
Address getPeerAddress(session_t peer_id);
- bool setLocalPlayerAnimations(RemotePlayer *player, v2s32 animation_frames[4],
+ void setLocalPlayerAnimations(RemotePlayer *player, v2s32 animation_frames[4],
f32 frame_speed);
- bool setPlayerEyeOffset(RemotePlayer *player, v3f first, v3f third);
+ void setPlayerEyeOffset(RemotePlayer *player, const v3f &first, const v3f &third);
- bool setSky(RemotePlayer *player, const video::SColor &bgcolor,
+ void setSky(RemotePlayer *player, const video::SColor &bgcolor,
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);
+ void setClouds(RemotePlayer *player, const CloudParams ¶ms);
bool overrideDayNightRatio(RemotePlayer *player, bool do_override, float brightness);
void SendSetSky(session_t peer_id, const video::SColor &bgcolor,
const std::string &type, const std::vector<std::string> ¶ms,
bool &clouds);
- void SendCloudParams(session_t peer_id, float density,
- const video::SColor &color_bright,
- const video::SColor &color_ambient,
- float height,
- float thickness,
- const v2f &speed);
+ 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,
const std::string &message, session_t from_peer);
void sendAddNode(v3s16 p, MapNode n, u16 ignore_id=0,
std::vector<u16> *far_players=NULL, float far_d_nodes=100,
bool remove_metadata=true);
- void setBlockNotSent(v3s16 p);
// Environment and Connection must be locked when called
void SendBlockNoLock(session_t peer_id, MapBlock *block, u8 ver, u16 net_proto_version);
// Rollback manager (behind m_env_mutex)
IRollbackManager *m_rollback = nullptr;
- bool m_enable_rollback_recording = false; // Updated once in a while
// Emerge manager
EmergeManager *m_emerge = nullptr;
EventManager *m_event;
// Mods
- std::vector<ModSpec> m_mods;
+ std::unique_ptr<ServerModManager> m_modmgr;
/*
Threads
This is behind m_env_mutex
*/
VoxelArea m_ignore_map_edit_events_area;
- /*
- If set to !=0, the incoming MapEditEvents are modified to have
- this peed id as the disabled recipient
- This is behind m_env_mutex
- */
- session_t m_ignore_map_edit_events_peer_id = 0;
// media files known to server
std::unordered_map<std::string, MediaInfo> m_media;