summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-06-18 19:55:15 +0200
committerGitHub <noreply@github.com>2017-06-18 19:55:15 +0200
commit4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f (patch)
tree57ce8401a5f6538024c1f19d37d576fba21e147b /src/server.h
parent8f7785771b9e02b1a1daf7a252550d78ea93053d (diff)
downloadminetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.tar.gz
minetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.tar.bz2
minetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.zip
Cpp11 patchset 11: continue working on constructor style migration (#6004)
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/server.h b/src/server.h
index 3086e8762..b60482a75 100644
--- a/src/server.h
+++ b/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;
};
/*