mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Cpp11 patchset 11: continue working on constructor style migration (#6004)
This commit is contained in:
parent
8f7785771b
commit
4faaadc8d5
39 changed files with 200 additions and 396 deletions
48
src/server.h
48
src/server.h
|
@ -113,8 +113,8 @@ struct ServerSoundParams
|
|||
float fade = 0.0f;
|
||||
float pitch = 1.0f;
|
||||
bool loop = false;
|
||||
float max_hear_distance = 32*BS;
|
||||
v3f pos = v3f(0, 0, 0);
|
||||
float max_hear_distance = 32 * BS;
|
||||
v3f pos;
|
||||
u16 object = 0;
|
||||
std::string to_player = "";
|
||||
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
bool simple_singleplayer_mode,
|
||||
bool ipv6,
|
||||
bool dedicated,
|
||||
ChatInterface *iface = NULL
|
||||
ChatInterface *iface = nullptr
|
||||
);
|
||||
~Server();
|
||||
DISABLE_CLASS_COPY(Server);
|
||||
|
@ -521,32 +521,32 @@ private:
|
|||
MutexedVariable<std::string> m_async_fatal_error;
|
||||
|
||||
// Some timers
|
||||
float m_liquid_transform_timer;
|
||||
float m_liquid_transform_every;
|
||||
float m_masterserver_timer;
|
||||
float m_emergethread_trigger_timer;
|
||||
float m_savemap_timer;
|
||||
float m_liquid_transform_timer = 0.0f;
|
||||
float m_liquid_transform_every = 1.0f;
|
||||
float m_masterserver_timer = 0.0f;
|
||||
float m_emergethread_trigger_timer = 0.0f;
|
||||
float m_savemap_timer = 0.0f;
|
||||
IntervalLimiter m_map_timer_and_unload_interval;
|
||||
|
||||
// Environment
|
||||
ServerEnvironment *m_env;
|
||||
ServerEnvironment *m_env = nullptr;
|
||||
|
||||
// server connection
|
||||
con::Connection m_con;
|
||||
|
||||
// Ban checking
|
||||
BanManager *m_banmanager;
|
||||
BanManager *m_banmanager = nullptr;
|
||||
|
||||
// Rollback manager (behind m_env_mutex)
|
||||
IRollbackManager *m_rollback;
|
||||
bool m_enable_rollback_recording; // Updated once in a while
|
||||
IRollbackManager *m_rollback = nullptr;
|
||||
bool m_enable_rollback_recording = false; // Updated once in a while
|
||||
|
||||
// Emerge manager
|
||||
EmergeManager *m_emerge;
|
||||
EmergeManager *m_emerge = nullptr;
|
||||
|
||||
// Scripting
|
||||
// Envlock and conlock should be locked when using Lua
|
||||
ServerScripting *m_script;
|
||||
ServerScripting *m_script = nullptr;
|
||||
|
||||
// Item definition manager
|
||||
IWritableItemDefManager *m_itemdef;
|
||||
|
@ -569,21 +569,21 @@ private:
|
|||
|
||||
// A buffer for time steps
|
||||
// step() increments and AsyncRunStep() run by m_thread reads it.
|
||||
float m_step_dtime;
|
||||
float m_step_dtime = 0.0f;
|
||||
std::mutex m_step_dtime_mutex;
|
||||
|
||||
// current server step lag counter
|
||||
float m_lag;
|
||||
|
||||
// The server mainly operates in this thread
|
||||
ServerThread *m_thread;
|
||||
ServerThread *m_thread = nullptr;
|
||||
|
||||
/*
|
||||
Time related stuff
|
||||
*/
|
||||
|
||||
// Timer for sending time of day over network
|
||||
float m_time_of_day_send_timer;
|
||||
float m_time_of_day_send_timer = 0.0f;
|
||||
// Uptime of server in seconds
|
||||
MutexedVariable<double> m_uptime;
|
||||
/*
|
||||
|
@ -602,10 +602,10 @@ private:
|
|||
Random stuff
|
||||
*/
|
||||
|
||||
bool m_shutdown_requested;
|
||||
bool m_shutdown_requested = false;
|
||||
std::string m_shutdown_msg;
|
||||
bool m_shutdown_ask_reconnect;
|
||||
float m_shutdown_timer;
|
||||
bool m_shutdown_ask_reconnect = false;
|
||||
float m_shutdown_timer = 0.0f;
|
||||
|
||||
ChatInterface *m_admin_chat;
|
||||
std::string m_admin_nick;
|
||||
|
@ -629,7 +629,7 @@ private:
|
|||
all sending of information by itself.
|
||||
This is behind m_env_mutex
|
||||
*/
|
||||
bool m_ignore_map_edit_events;
|
||||
bool m_ignore_map_edit_events = false;
|
||||
/*
|
||||
If a non-empty area, map edit events contained within are left
|
||||
unsent. Done at map generation time to speed up editing of the
|
||||
|
@ -642,7 +642,7 @@ private:
|
|||
this peed id as the disabled recipient
|
||||
This is behind m_env_mutex
|
||||
*/
|
||||
u16 m_ignore_map_edit_events_peer_id;
|
||||
u16 m_ignore_map_edit_events_peer_id = 0;
|
||||
|
||||
// media files known to server
|
||||
std::unordered_map<std::string, MediaInfo> m_media;
|
||||
|
@ -651,7 +651,7 @@ private:
|
|||
Sounds
|
||||
*/
|
||||
std::unordered_map<s32, ServerPlayingSound> m_playing_sounds;
|
||||
s32 m_next_sound_id;
|
||||
s32 m_next_sound_id = 0;
|
||||
|
||||
/*
|
||||
Detached inventories (behind m_env_mutex)
|
||||
|
@ -662,7 +662,7 @@ private:
|
|||
std::map<std::string, std::string> m_detached_inventories_player;
|
||||
|
||||
std::unordered_map<std::string, ModMetadata *> m_mod_storages;
|
||||
float m_mod_storage_save_timer;
|
||||
float m_mod_storage_save_timer = 10.0f;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue