Cpp11 patchset 11: continue working on constructor style migration (#6004)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Sun, 18 Jun 2017 17:55:15 +0000 (19:55 +0200)
committerGitHub <noreply@github.com>
Sun, 18 Jun 2017 17:55:15 +0000 (19:55 +0200)
39 files changed:
src/mesh_generator_thread.cpp
src/mesh_generator_thread.h
src/mg_biome.h
src/mg_decoration.cpp
src/mg_decoration.h
src/mg_ore.cpp
src/mg_ore.h
src/mg_schematic.cpp
src/mg_schematic.h
src/minimap.cpp
src/minimap.h
src/modalMenu.h
src/mods.cpp
src/mods.h
src/nameidmapping.h
src/nodedef.cpp
src/nodedef.h
src/nodetimer.h
src/noise.cpp
src/noise.h
src/object_properties.cpp
src/object_properties.h
src/particles.cpp
src/particles.h
src/player.cpp
src/player.h
src/profiler.cpp
src/profiler.h
src/reflowscan.cpp
src/reflowscan.h
src/remoteplayer.cpp
src/remoteplayer.h
src/rollback.cpp
src/rollback.h
src/rollback_interface.h
src/server.cpp
src/server.h
src/serverenvironment.cpp
src/serverenvironment.h

index d95506de1e633d4eb66cfecc2acd034c7d448ee8..f06bddb573bd03a33aa156d6606e9691ac2e6dd6 100644 (file)
@@ -28,14 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        CachedMapBlockData
 */
 
-CachedMapBlockData::CachedMapBlockData():
-       p(-1337,-1337,-1337),
-       data(NULL),
-       refcount_from_queue(0),
-       last_used_timestamp(time(0))
-{
-}
-
 CachedMapBlockData::~CachedMapBlockData()
 {
        assert(refcount_from_queue == 0);
@@ -47,16 +39,6 @@ CachedMapBlockData::~CachedMapBlockData()
        QueuedMeshUpdate
 */
 
-QueuedMeshUpdate::QueuedMeshUpdate():
-       p(-1337,-1337,-1337),
-       ack_block_to_server(false),
-       urgent(false),
-       crack_level(-1),
-       crack_pos(0,0,0),
-       data(NULL)
-{
-}
-
 QueuedMeshUpdate::~QueuedMeshUpdate()
 {
        delete data;
index 3ac086e30be40ff1ffc91b4034034bf0c880056b..77b34a3ce1addbcf0b698a19b99017778d11645d 100644 (file)
@@ -27,25 +27,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 struct CachedMapBlockData
 {
-       v3s16 p;
-       MapNode *data; // A copy of the MapBlock's data member
-       int refcount_from_queue;
-       int last_used_timestamp;
+       v3s16 p = v3s16(-1337, -1337, -1337);
+       MapNode *data = nullptr; // A copy of the MapBlock's data member
+       int refcount_from_queue = 0;
+       int last_used_timestamp = std::time(0);
 
-       CachedMapBlockData();
+       CachedMapBlockData() {}
        ~CachedMapBlockData();
 };
 
 struct QueuedMeshUpdate
 {
-       v3s16 p;
-       bool ack_block_to_server;
-       bool urgent;
-       int crack_level;
+       v3s16 p = v3s16(-1337, -1337, -1337);
+       bool ack_block_to_server = false;
+       bool urgent = false;
+       int crack_level = -1;
        v3s16 crack_pos;
-       MeshMakeData *data; // This is generated in MeshUpdateQueue::pop()
+       MeshMakeData *data = nullptr; // This is generated in MeshUpdateQueue::pop()
 
-       QueuedMeshUpdate();
+       QueuedMeshUpdate(){};
        ~QueuedMeshUpdate();
 };
 
@@ -101,14 +101,11 @@ private:
 
 struct MeshUpdateResult
 {
-       v3s16 p;
-       MapBlockMesh *mesh;
-       bool ack_block_to_server;
+       v3s16 p = v3s16(-1338, -1338, -1338);
+       MapBlockMesh *mesh = nullptr;
+       bool ack_block_to_server = false;
 
-       MeshUpdateResult()
-           : p(-1338, -1338, -1338), mesh(NULL), ack_block_to_server(false)
-       {
-       }
+       MeshUpdateResult() {}
 };
 
 class MeshUpdateThread : public UpdateThread
index 2e07fd9cfad1a00fe3da87b4724b6dbea66bee59..854ada5048b30c2cb663c9fb8503ed60e616f770 100644 (file)
@@ -117,10 +117,10 @@ public:
        virtual Biome *getBiomeAtIndex(size_t index, s16 y) const = 0;
 
        // Result of calcBiomes bulk computation.
-       biome_t *biomemap;
+       biome_t *biomemap = nullptr;
 
 protected:
-       BiomeManager *m_bmgr;
+       BiomeManager *m_bmgr = nullptr;
        v3s16 m_pmin;
        v3s16 m_csize;
 };
index 1a469cd9ca24fa026dd289ac5fc630878d7a2c7f..b13ddbadb1724ff71c30d8d32b9953c01ec2cd04 100644 (file)
@@ -67,21 +67,6 @@ size_t DecorationManager::placeAllDecos(Mapgen *mg, u32 blockseed,
 
 ///////////////////////////////////////////////////////////////////////////////
 
-
-Decoration::Decoration()
-{
-       mapseed    = 0;
-       fill_ratio = 0;
-       sidelen    = 1;
-       flags      = 0;
-}
-
-
-Decoration::~Decoration()
-{
-}
-
-
 void Decoration::resolveNodeNames()
 {
        getIdsFromNrBacklog(&c_place_on);
@@ -330,13 +315,6 @@ int DecoSimple::getHeight()
 
 ///////////////////////////////////////////////////////////////////////////////
 
-
-DecoSchematic::DecoSchematic()
-{
-       schematic = NULL;
-}
-
-
 size_t DecoSchematic::generate(MMVManip *vm, PcgRandom *pr, v3s16 p)
 {
        // Schematic could have been unloaded but not the decoration
index 6a48796d808854e93abc33920cc2b36219205b01..968c78612420585f81f6c92ecb861f4153e55ebf 100644 (file)
@@ -64,8 +64,8 @@ struct CutoffData {
 
 class Decoration : public ObjDef, public NodeResolver {
 public:
-       Decoration();
-       virtual ~Decoration();
+       Decoration() {};
+       virtual ~Decoration() {};
 
        virtual void resolveNodeNames();
 
@@ -76,13 +76,13 @@ public:
        virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p) = 0;
        virtual int getHeight() = 0;
 
-       u32 flags;
-       int mapseed;
+       u32 flags = 0;
+       int mapseed = 0;
        std::vector<content_t> c_place_on;
-       s16 sidelen;
+       s16 sidelen = 1;
        s16 y_min;
        s16 y_max;
-       float fill_ratio;
+       float fill_ratio = 0.0f;
        NoiseParams np;
        std::vector<content_t> c_spawnby;
        s16 nspawnby;
@@ -104,13 +104,13 @@ public:
 
 class DecoSchematic : public Decoration {
 public:
-       DecoSchematic();
+       DecoSchematic() {};
 
        virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p);
        virtual int getHeight();
 
        Rotation rotation;
-       Schematic *schematic;
+       Schematic *schematic = nullptr;
 };
 
 
index 6275de313490a774ae5fa01bb49cc01d1efd2a31..f959ca9e65b9fa760282baf392e620da9a26d5ab 100644 (file)
@@ -72,14 +72,6 @@ void OreManager::clear()
 
 ///////////////////////////////////////////////////////////////////////////////
 
-
-Ore::Ore()
-{
-       flags = 0;
-       noise = NULL;
-}
-
-
 Ore::~Ore()
 {
        delete noise;
@@ -232,8 +224,6 @@ void OreSheet::generate(MMVManip *vm, int mapseed, u32 blockseed,
 OrePuff::OrePuff() :
        Ore()
 {
-       noise_puff_top    = NULL;
-       noise_puff_bottom = NULL;
 }
 
 
@@ -385,7 +375,6 @@ void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
 OreVein::OreVein() :
        Ore()
 {
-       noise2 = NULL;
 }
 
 
index 77025e1bb9f8e403611ffe93ac1b22d128bd1366..4b052e07a29a3cbc69a548742c8c8e4241ecac61 100644 (file)
@@ -62,13 +62,13 @@ public:
        s16 y_min;
        s16 y_max;
        u8 ore_param2;          // to set node-specific attributes
-       u32 flags;          // attributes for this ore
+       u32 flags = 0;          // attributes for this ore
        float nthresh;      // threshold for noise at which an ore is placed
        NoiseParams np;     // noise for distribution of clusters (NULL for uniform scattering)
-       Noise *noise;
+       Noise *noise = nullptr;
        std::unordered_set<u8> biomes;
 
-       Ore();
+       Ore() {};
        virtual ~Ore();
 
        virtual void resolveNodeNames();
@@ -104,8 +104,8 @@ public:
 
        NoiseParams np_puff_top;
        NoiseParams np_puff_bottom;
-       Noise *noise_puff_top;
-       Noise *noise_puff_bottom;
+       Noise *noise_puff_top = nullptr;
+       Noise *noise_puff_bottom = nullptr;
 
        OrePuff();
        virtual ~OrePuff();
@@ -127,7 +127,7 @@ public:
        static const bool NEEDS_NOISE = true;
 
        float random_factor;
-       Noise *noise2;
+       Noise *noise2 = nullptr;
 
        OreVein();
        virtual ~OreVein();
@@ -160,7 +160,7 @@ public:
                case ORE_VEIN:
                        return new OreVein;
                default:
-                       return NULL;
+                       return nullptr;
                }
        }
 
index 3cea3c321e66d26e08ee4f261922f14ebda6335c..c50e90b3a54d35f7abdf2cb7f09f0ee518f81eca 100644 (file)
@@ -37,9 +37,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 
 SchematicManager::SchematicManager(Server *server) :
-       ObjDefManager(server, OBJDEF_SCHEMATIC)
+       ObjDefManager(server, OBJDEF_SCHEMATIC),
+       m_server(server)
 {
-       m_server = server;
 }
 
 
@@ -69,10 +69,6 @@ void SchematicManager::clear()
 
 Schematic::Schematic()
 {
-       schemdata   = NULL;
-       slice_probs = NULL;
-       flags       = 0;
-       size        = v3s16(0, 0, 0);
 }
 
 
index db040343cdc3fe2db640137cf5f3e9875c5b8e79..16e967a7c5e8e9158ba2c0ee8729d721d77aa4f6 100644 (file)
@@ -117,10 +117,10 @@ public:
                std::vector<std::pair<s16, u8> > *splist);
 
        std::vector<content_t> c_nodes;
-       u32 flags;
+       u32 flags = 0;
        v3s16 size;
-       MapNode *schemdata;
-       u8 *slice_probs;
+       MapNode *schemdata = nullptr;
+       u8 *slice_probs = nullptr;
 };
 
 class SchematicManager : public ObjDefManager {
index 500f49828a93463f9700cf56bd0acecf01b71066..9b17cbc6ea8c342b60528bb7922d9f63f6b1ad86 100644 (file)
@@ -204,8 +204,6 @@ Minimap::Minimap(IrrlichtDevice *device, Client *client)
        data->mode              = MINIMAP_MODE_OFF;
        data->is_radar          = false;
        data->map_invalidated   = true;
-       data->heightmap_image   = NULL;
-       data->minimap_image     = NULL;
        data->texture           = NULL;
        data->heightmap_texture = NULL;
        data->minimap_shape_round = g_settings->getBool("minimap_shape_round");
@@ -275,14 +273,14 @@ void Minimap::toggleMinimapShape()
 void Minimap::setMinimapShape(MinimapShape shape)
 {
        MutexAutoLock lock(m_mutex);
-       
+
        if (shape == MINIMAP_SHAPE_SQUARE)
                data->minimap_shape_round = false;
        else if (shape == MINIMAP_SHAPE_ROUND)
                data->minimap_shape_round = true;
-       
+
        g_settings->setBool("minimap_shape_round", data->minimap_shape_round);
-       m_minimap_update_thread->deferUpdate(); 
+       m_minimap_update_thread->deferUpdate();
 }
 
 MinimapShape Minimap::getMinimapShape()
index 58d05d6680ee65ca4b41356098bc184b8413d515..04ac27a04984c838f7031f15235ec16c5b400337 100644 (file)
@@ -78,21 +78,19 @@ struct MinimapData {
        MinimapPixel minimap_scan[MINIMAP_MAX_SX * MINIMAP_MAX_SY];
        bool map_invalidated;
        bool minimap_shape_round;
-       video::IImage *minimap_image;
-       video::IImage *heightmap_image;
-       video::IImage *minimap_mask_round;
-       video::IImage *minimap_mask_square;
-       video::ITexture *texture;
-       video::ITexture *heightmap_texture;
-       video::ITexture *minimap_overlay_round;
-       video::ITexture *minimap_overlay_square;
-       video::ITexture *player_marker;
-       video::ITexture *object_marker_red;
+       video::IImage *minimap_mask_round = nullptr;
+       video::IImage *minimap_mask_square = nullptr;
+       video::ITexture *texture = nullptr;
+       video::ITexture *heightmap_texture = nullptr;
+       video::ITexture *minimap_overlay_round = nullptr;
+       video::ITexture *minimap_overlay_square = nullptr;
+       video::ITexture *player_marker = nullptr;
+       video::ITexture *object_marker_red = nullptr;
 };
 
 struct QueuedMinimapUpdate {
        v3s16 pos;
-       MinimapMapblock *data;
+       MinimapMapblock *data = nullptr;
 };
 
 class MinimapUpdateThread : public UpdateThread {
@@ -105,7 +103,7 @@ public:
        bool pushBlockUpdate(v3s16 pos, MinimapMapblock *data);
        bool popBlockUpdate(QueuedMinimapUpdate *update);
 
-       MinimapData *data;
+       MinimapData *data = nullptr;
 
 protected:
        virtual void doUpdate();
index 38a26535e4ffe752d876910971ba69aeef8c441c..7dbf36fbc7455e3be8204e85de5083e22a23020a 100644 (file)
@@ -48,11 +48,7 @@ public:
                IGUIElement(gui::EGUIET_ELEMENT, env, parent, id,
                                core::rect<s32>(0,0,100,100))
        {
-               //m_force_regenerate_gui = false;
-
                m_menumgr = menumgr;
-               m_allow_focus_removal = false;
-               m_screensize_old = v2u32(0,0);
 
                setVisible(true);
                Environment->setFocus(this);
@@ -142,7 +138,7 @@ private:
        IMenuManager *m_menumgr;
        // This might be necessary to expose to the implementation if it
        // wants to launch other menus
-       bool m_allow_focus_removal;
+       bool m_allow_focus_removal = false;
 };
 
 
index 5a71ca2d461742584eb80b679d38cc702c3fd67e..a555a5b13ca4d7c3044d1de5e9fe2a19ef8fcb8e 100644 (file)
@@ -385,10 +385,8 @@ Json::Value getModstoreUrl(const std::string &url)
 #endif
 
 ModMetadata::ModMetadata(const std::string &mod_name):
-       m_mod_name(mod_name),
-       m_modified(false)
+       m_mod_name(mod_name)
 {
-       m_stringvars.clear();
 }
 
 void ModMetadata::clear()
index 792280b8b4faed58b2facd3a0057c0f1c787a0d4..1a5c32692bdb3a3ff81a9e14443187bbdbb11bf5 100644 (file)
@@ -42,19 +42,13 @@ struct ModSpec
        std::unordered_set<std::string> optdepends;
        std::unordered_set<std::string> unsatisfied_depends;
 
-       bool part_of_modpack;
-       bool is_modpack;
+       bool part_of_modpack = false;
+       bool is_modpack = false;
        // if modpack:
        std::map<std::string,ModSpec> modpack_content;
        ModSpec(const std::string &name_="", const std::string &path_=""):
                name(name_),
-               path(path_),
-               depends(),
-               optdepends(),
-               unsatisfied_depends(),
-               part_of_modpack(false),
-               is_modpack(false),
-               modpack_content()
+               path(path_)
        {}
 };
 
@@ -235,7 +229,7 @@ public:
        virtual bool setString(const std::string &name, const std::string &var);
 private:
        std::string m_mod_name;
-       bool m_modified;
+       bool m_modified = false;
 };
 
 #endif
index 3898430619606d2c43edc7fb560afc377f2fafe2..90aadcf6d382e348ba881a1aa6ff3157530c3be5 100644 (file)
@@ -56,6 +56,7 @@ public:
                m_id_to_name.erase(id);
                m_name_to_id.erase(name);
        }
+
        void eraseName(const std::string &name)
        {
                u16 id;
index db7e36620d589f8f9d32da46438807028127b096..1b6c28cf6cdcdda3443f06b1008c195b3e9164bc 100644 (file)
@@ -1923,11 +1923,6 @@ bool CNodeDefManager::nodeboxConnects(MapNode from, MapNode to, u8 connect_face)
 
 NodeResolver::NodeResolver()
 {
-       m_ndef            = NULL;
-       m_nodenames_idx   = 0;
-       m_nnlistsizes_idx = 0;
-       m_resolve_done    = false;
-
        m_nodenames.reserve(16);
        m_nnlistsizes.reserve(4);
 }
index 4669df7f04ae5136ec10fa28ace2198c8d2b1ccd..97697e746dd6a6d0fc7077bfb3caf727929afd21 100644 (file)
@@ -207,24 +207,18 @@ enum PlantlikeStyle {
 
 struct TileDef
 {
-       std::string name;
-       bool backface_culling; // Takes effect only in special cases
-       bool tileable_horizontal;
-       bool tileable_vertical;
+       std::string name = "";
+       bool backface_culling = true; // Takes effect only in special cases
+       bool tileable_horizontal = true;
+       bool tileable_vertical = true;
        //! If true, the tile has its own color.
-       bool has_color;
+       bool has_color = false;
        //! The color of the tile.
-       video::SColor color;
+       video::SColor color = video::SColor(0xFFFFFFFF);
 
        struct TileAnimationParams animation;
 
-       TileDef() :
-               name(""),
-               backface_culling(true),
-               tileable_horizontal(true),
-               tileable_vertical(true),
-               has_color(false),
-               color(video::SColor(0xFFFFFFFF))
+       TileDef()
        {
                animation.type = TAT_NONE;
        }
@@ -514,12 +508,12 @@ public:
 
        void nodeResolveInternal();
 
-       u32 m_nodenames_idx;
-       u32 m_nnlistsizes_idx;
+       u32 m_nodenames_idx = 0;
+       u32 m_nnlistsizes_idx = 0;
        std::vector<std::string> m_nodenames;
        std::vector<size_t> m_nnlistsizes;
-       INodeDefManager *m_ndef;
-       bool m_resolve_done;
+       INodeDefManager *m_ndef = nullptr;
+       bool m_resolve_done = false;
 };
 
 #endif
index 0fd43b2a886598cb00a188873718c907e39ca670..e6a8d76085c2f1e0db09154edb700c4cb6a720ca 100644 (file)
@@ -36,18 +36,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class NodeTimer
 {
 public:
-       NodeTimer(): timeout(0.), elapsed(0.) {}
+       NodeTimer() {}
        NodeTimer(const v3s16 &position_):
-               timeout(0.), elapsed(0.), position(position_) {}
+               position(position_) {}
        NodeTimer(f32 timeout_, f32 elapsed_, v3s16 position_):
                timeout(timeout_), elapsed(elapsed_), position(position_) {}
        ~NodeTimer() {}
-       
+
        void serialize(std::ostream &os) const;
        void deSerialize(std::istream &is);
-       
-       f32 timeout;
-       f32 elapsed;
+
+       f32 timeout = 0.0f;
+       f32 elapsed = 0.0f;
        v3s16 position;
 };
 
@@ -58,12 +58,12 @@ public:
 class NodeTimerList
 {
 public:
-       NodeTimerList(): m_next_trigger_time(-1.), m_time(0.) {}
+       NodeTimerList() {}
        ~NodeTimerList() {}
-       
+
        void serialize(std::ostream &os, u8 map_format_version) const;
        void deSerialize(std::istream &is, u8 map_format_version);
-       
+
        // Get timer
        NodeTimer get(const v3s16 &p) {
                std::map<v3s16, std::multimap<double, NodeTimer>::iterator>::iterator n =
@@ -128,8 +128,8 @@ public:
 private:
        std::multimap<double, NodeTimer> m_timers;
        std::map<v3s16, std::multimap<double, NodeTimer>::iterator> m_iterators;
-       double m_next_trigger_time;
-       double m_time;
+       double m_next_trigger_time = -1.0;
+       double m_time = 0.0;
 };
 
 #endif
index b918c9936851ccb638dcf617f1cc6c8ef9dc34fd..e75fb8278b3dc61c6422989f614428592bcf6fe6 100644 (file)
@@ -433,10 +433,6 @@ Noise::Noise(NoiseParams *np_, s32 seed, u32 sx, u32 sy, u32 sz)
        this->sy   = sy;
        this->sz   = sz;
 
-       this->persist_buf  = NULL;
-       this->gradient_buf = NULL;
-       this->result       = NULL;
-
        allocBuffers();
 }
 
index 41b93ae01931ab907f9e673702751b1e2111dbe8..d5aca4def899666619c5bb32697fd3faa0ad5637 100644 (file)
@@ -102,26 +102,16 @@ private:
 #define NOISE_FLAG_SIMPLEX     0x10
 
 struct NoiseParams {
-       float offset;
-       float scale;
-       v3f spread;
-       s32 seed;
-       u16 octaves;
-       float persist;
-       float lacunarity;
-       u32 flags;
+       float offset = 0.0f;
+       float scale = 1.0f;
+       v3f spread = v3f(250, 250, 250);
+       s32 seed = 12345;
+       u16 octaves = 3;
+       float persist = 0.6f;
+       float lacunarity = 2.0f;
+       u32 flags = NOISE_FLAG_DEFAULTS;
 
-       NoiseParams()
-       {
-               offset     = 0.0f;
-               scale      = 1.0f;
-               spread     = v3f(250, 250, 250);
-               seed       = 12345;
-               octaves    = 3;
-               persist    = 0.6f;
-               lacunarity = 2.0f;
-               flags      = NOISE_FLAG_DEFAULTS;
-       }
+       NoiseParams() {}
 
        NoiseParams(float offset_, float scale_, v3f spread_, s32 seed_,
                u16 octaves_, float persist_, float lacunarity_,
@@ -138,13 +128,6 @@ struct NoiseParams {
        }
 };
 
-
-// Convenience macros for getting/setting NoiseParams in Settings as a string
-// WARNING:  Deprecated, use Settings::getNoiseParamsFromValue() instead
-#define NOISEPARAMS_FMT_STR "f,f,v3,s32,u16,f"
-//#define getNoiseParams(x, y) getStruct((x), NOISEPARAMS_FMT_STR, &(y), sizeof(y))
-//#define setNoiseParams(x, y) setStruct((x), NOISEPARAMS_FMT_STR, &(y))
-
 class Noise {
 public:
        NoiseParams np;
@@ -152,10 +135,10 @@ public:
        u32 sx;
        u32 sy;
        u32 sz;
-       float *noise_buf;
-       float *gradient_buf;
-       float *persist_buf;
-       float *result;
+       float *noise_buf = nullptr;
+       float *gradient_buf = nullptr;
+       float *persist_buf = nullptr;
+       float *result = nullptr;
 
        Noise(NoiseParams *np, s32 seed, u32 sx, u32 sy, u32 sz=1);
        ~Noise();
index a77368151db64753f26314cf7b7fffbbfd53117d..af442806b11749267b972e1aed61911236c040b8 100644 (file)
@@ -24,27 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/basic_macros.h"
 #include <sstream>
 
-ObjectProperties::ObjectProperties():
-       hp_max(1),
-       physical(false),
-       collideWithObjects(true),
-       weight(5),
-       collisionbox(-0.5,-0.5,-0.5, 0.5,0.5,0.5),
-       visual("sprite"),
-       mesh(""),
-       visual_size(1,1),
-       spritediv(1,1),
-       initial_sprite_basepos(0,0),
-       is_visible(true),
-       makes_footstep_sound(false),
-       automatic_rotate(0),
-       stepheight(0),
-       automatic_face_movement_dir(false),
-       automatic_face_movement_dir_offset(0.0),
-       backface_culling(true),
-       nametag(""),
-       nametag_color(255, 255, 255, 255),
-       automatic_face_movement_max_rotation_per_sec(-1)
+ObjectProperties::ObjectProperties()
 {
        textures.push_back("unknown_object.png");
        colors.push_back(video::SColor(255,255,255,255));
index 908757a644752d8fa0f29df058cd7ac35128df6d..772807fd994dae7f7f3773a1a40e97e105edc20d 100644 (file)
@@ -29,28 +29,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 struct ObjectProperties
 {
        // Values are BS=1
-       s16 hp_max;
-       bool physical;
-       bool collideWithObjects;
-       float weight;
-       aabb3f collisionbox;
-       std::string visual;
-       std::string mesh;
-       v2f visual_size;
+       s16 hp_max = 1;
+       bool physical = false;
+       bool collideWithObjects = true;
+       float weight = 5.0f;
+       aabb3f collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f);
+       std::string visual = "sprite";
+       std::string mesh = "";
+       v2f visual_size = v2f(1, 1);
        std::vector<std::string> textures;
        std::vector<video::SColor> colors;
-       v2s16 spritediv;
+       v2s16 spritediv = v2s16(1, 1);
        v2s16 initial_sprite_basepos;
-       bool is_visible;
-       bool makes_footstep_sound;
-       float automatic_rotate;
-       f32 stepheight;
-       bool automatic_face_movement_dir;
-       f32 automatic_face_movement_dir_offset;
-       bool backface_culling;
-       std::string nametag;
-       video::SColor nametag_color;
-       f32 automatic_face_movement_max_rotation_per_sec;
+       bool is_visible = true;
+       bool makes_footstep_sound = false;
+       float automatic_rotate = 0.0f;
+       f32 stepheight = 0.0f;
+       bool automatic_face_movement_dir = false;
+       f32 automatic_face_movement_dir_offset = 0.0f;
+       bool backface_culling = true;
+       std::string nametag = "";
+       video::SColor nametag_color = video::SColor(255, 255, 255, 255);
+       f32 automatic_face_movement_max_rotation_per_sec = -1.0f;
        std::string infotext;
        //! For dropped items, this contains item information.
        std::string wield_item;
index fe681fe6c45028b39514c1afd9ee9821ac500941..a02c32f2175881861dc9596d714b25a2d8546d1d 100644 (file)
@@ -76,8 +76,6 @@ Particle::Particle(
        m_texpos = texpos;
        m_texsize = texsize;
        m_animation = anim;
-       m_animation_frame = 0;
-       m_animation_time = 0.0;
 
        // Color
        m_base_color = color;
@@ -88,7 +86,6 @@ Particle::Particle(
        m_velocity = velocity;
        m_acceleration = acceleration;
        m_expiration = expirationtime;
-       m_time = 0;
        m_player = player;
        m_size = size;
        m_collisiondetection = collisiondetection;
index 87583aae6a260e479c647bbda3f57d7a3f30538c..9b10afe4b384a03a29abdbafde319c769e146802 100644 (file)
@@ -86,7 +86,7 @@ private:
        void updateVertices();
 
        video::S3DVertex m_vertices[4];
-       float m_time;
+       float m_time = 0.0f;
        float m_expiration;
 
        ClientEnvironment *m_env;
@@ -110,8 +110,8 @@ private:
        bool m_vertical;
        v3s16 m_camera_offset;
        struct TileAnimationParams m_animation;
-       float m_animation_time;
-       int m_animation_frame;
+       float m_animation_time = 0.0f;
+       int m_animation_frame = 0;
        u8 m_glow;
 };
 
index 85bc639ec17970b2f05f998795a021ed6663211e..53e1734981da2b227fc78b846af591e884c0b53f 100644 (file)
@@ -30,11 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 
 Player::Player(const char *name, IItemDefManager *idef):
-       inventory(idef),
-       peer_id(PEER_ID_INEXISTENT),
-       keyPressed(0),
-// protected
-       m_speed(0,0,0)
+       inventory(idef)
 {
        strlcpy(m_name, name, PLAYERNAME_SIZE);
 
index 00d27cb90e98f822c719b13a7595b60b31baeb3e..fc799afb17fc21d696bfc66c637a2a5c895581a4 100644 (file)
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_bloated.h"
 #include "inventory.h"
+#include "constants.h"
 #include <list>
 #include <mutex>
 
@@ -32,22 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 struct PlayerControl
 {
-       PlayerControl()
-       {
-               up = false;
-               down = false;
-               left = false;
-               right = false;
-               jump = false;
-               aux1 = false;
-               sneak = false;
-               LMB = false;
-               RMB = false;
-               pitch = 0;
-               yaw = 0;
-               sidew_move_joystick_axis = .0f;
-               forw_move_joystick_axis = .0f;
-       }
+       PlayerControl() {}
 
        PlayerControl(
                bool a_up,
@@ -81,20 +67,20 @@ struct PlayerControl
                sidew_move_joystick_axis = a_sidew_move_joystick_axis;
                forw_move_joystick_axis = a_forw_move_joystick_axis;
        }
-       bool up;
-       bool down;
-       bool left;
-       bool right;
-       bool jump;
-       bool aux1;
-       bool sneak;
-       bool zoom;
-       bool LMB;
-       bool RMB;
-       float pitch;
-       float yaw;
-       float sidew_move_joystick_axis;
-       float forw_move_joystick_axis;
+       bool up = false;
+       bool down = false;
+       bool left = false;
+       bool right = false;
+       bool jump = false;
+       bool aux1 = false;
+       bool sneak = false;
+       bool zoom = false;
+       bool LMB = false;
+       bool RMB = false;
+       float pitch = 0.0f;
+       float yaw = 0.0f;
+       float sidew_move_joystick_axis = 0.0f;
+       float forw_move_joystick_axis = 0.0f;
 };
 
 class Map;
@@ -161,14 +147,14 @@ public:
        v2s32 local_animations[4];
        float local_animation_speed;
 
-       u16 peer_id;
+       u16 peer_id = PEER_ID_INEXISTENT;
 
        std::string inventory_formspec;
 
        PlayerControl control;
        const PlayerControl& getPlayerControl() { return control; }
 
-       u32 keyPressed;
+       u32 keyPressed = 0;
 
        HudElement* getHud(u32 id);
        u32         addHud(HudElement* hud);
index 8e997442c9391392dfa08730deac3ffca6176f50..738a5b7e3957e9f3e3215ebc8f6fb8c1d0b972b7 100644 (file)
@@ -23,7 +23,7 @@ static Profiler main_profiler;
 Profiler *g_profiler = &main_profiler;
 ScopeProfiler::ScopeProfiler(
                Profiler *profiler, const std::string &name, ScopeProfilerType type)
-    : m_profiler(profiler), m_name(name), m_timer(NULL), m_type(type)
+    : m_profiler(profiler), m_name(name), m_type(type)
 {
        if (m_profiler)
                m_timer = new TimeTaker(m_name);
index 2d70e8af4fb3efc058c49878b32221234e14b3c5..cade887e8465a94e3ef85d09fd90c1573431e8a4 100644 (file)
@@ -42,9 +42,7 @@ extern Profiler *g_profiler;
 class Profiler
 {
 public:
-       Profiler()
-       {
-       }
+       Profiler() {}
 
        void add(const std::string &name, float value)
        {
@@ -195,9 +193,9 @@ public:
                        ScopeProfilerType type = SPT_ADD);
        ~ScopeProfiler();
 private:
-       Profiler *m_profiler;
+       Profiler *m_profiler = nullptr;
        std::string m_name;
-       TimeTaker *m_timer;
+       TimeTaker *m_timer = nullptr;
        enum ScopeProfilerType m_type;
 };
 
index 439b752653ceca10936b1e613a2d4f7212722007..fd169f1a833964b8e856959932adc686c8b52e6a 100644 (file)
@@ -26,8 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 ReflowScan::ReflowScan(Map *map, INodeDefManager *ndef) :
        m_map(map),
-       m_ndef(ndef),
-       m_liquid_queue(nullptr)
+       m_ndef(ndef)
 {
 }
 
index a6d289ad599a12436ba1bc3a192859596e70c32e..5b1ef9b5d3b31e1d80cf4c29323af2c0eb51352e 100644 (file)
@@ -39,10 +39,10 @@ private:
        void scanColumn(int x, int z);
 
 private:
-       Map *m_map;
-       INodeDefManager *m_ndef;
+       Map *m_map = nullptr;
+       INodeDefManager *m_ndef = nullptr;
        v3s16 m_block_pos, m_rel_block_pos;
-       UniqueQueue<v3s16> *m_liquid_queue;
+       UniqueQueue<v3s16> *m_liquid_queue = nullptr;
        MapBlock *m_lookup[3 * 3 * 3];
        u32 m_lookup_state_bitset;
 };
index 540132978a5cbedb9a983a708d4187046d1a3a75..c276062c2ad50552ff6eea70ffc94ca516fb7bf1 100644 (file)
@@ -36,15 +36,7 @@ float RemotePlayer::m_setting_chat_message_limit_per_10sec = 0.0f;
 u16 RemotePlayer::m_setting_chat_message_limit_trigger_kick = 0;
 
 RemotePlayer::RemotePlayer(const char *name, IItemDefManager *idef):
-       Player(name, idef),
-       protocol_version(0),
-       m_sao(NULL),
-       m_dirty(false),
-       m_last_chat_message_sent(time(NULL)),
-       m_chat_message_allowance(5.0f),
-       m_message_rate_overhead(0),
-       hud_hotbar_image(""),
-       hud_hotbar_selected_image("")
+       Player(name, idef)
 {
        if (!RemotePlayer::m_setting_cache_loaded) {
                RemotePlayer::m_setting_chat_message_limit_per_10sec =
index ee0d625b6b32fbf8e1513251bf4249409d51284d..965dede508f542a57571fde27d71fc95241b8077 100644 (file)
@@ -134,7 +134,7 @@ public:
 
        void setDirty(bool dirty) { m_dirty = true; }
 
-       u16 protocol_version;
+       u16 protocol_version = 0;
 
 private:
        /*
@@ -145,21 +145,21 @@ private:
        void serialize(std::ostream &os);
        void serializeExtraAttributes(std::string &output);
 
-       PlayerSAO *m_sao;
-       bool m_dirty;
+       PlayerSAO *m_sao = nullptr;
+       bool m_dirty = false;
 
        static bool m_setting_cache_loaded;
        static float m_setting_chat_message_limit_per_10sec;
        static u16 m_setting_chat_message_limit_trigger_kick;
 
-       u32 m_last_chat_message_sent;
-       float m_chat_message_allowance;
-       u16 m_message_rate_overhead;
+       u32 m_last_chat_message_sent = std::time(0);
+       float m_chat_message_allowance = 5.0f;
+       u16 m_message_rate_overhead = 0;
 
        bool m_day_night_ratio_do_override;
        float m_day_night_ratio;
-       std::string hud_hotbar_image;
-       std::string hud_hotbar_selected_image;
+       std::string hud_hotbar_image = "";
+       std::string hud_hotbar_selected_image = "";
 
        std::string m_sky_type;
        video::SColor m_sky_bgcolor;
index 4d34decf3264d5f851e7460878f1e03e8c537b2b..a77a9ee15d75761ce738143ef6e749f4d4c5b2cc 100644 (file)
@@ -91,8 +91,7 @@ struct Entity {
 
 RollbackManager::RollbackManager(const std::string & world_path,
                IGameDef * gamedef_) :
-       gamedef(gamedef_),
-       current_actor_is_guess(false)
+       gamedef(gamedef_)
 {
        verbosestream << "RollbackManager::RollbackManager(" << world_path
                << ")" << std::endl;
index a05ef8b78c80647681c8b9d3325d402963ed2e40..e0b3c7c555bb0a6bf8a4b99b5946498719415708 100644 (file)
@@ -80,10 +80,10 @@ private:
                time_t suspect_t, v3s16 action_p, time_t action_t);
 
 
-       IGameDef * gamedef;
+       IGameDef *gamedef = nullptr;
 
        std::string current_actor;
-       bool current_actor_is_guess;
+       bool current_actor_is_guess = false;
 
        std::list<RollbackAction> action_todisk_buffer;
        std::list<RollbackAction> action_latest_buffer;
index 92fab9b9cd02da79a4a3dca67f24eed3af48d071..a5f0c34fc2b52612d21fba2f2665f881c16893a8 100644 (file)
@@ -35,8 +35,8 @@ class InventoryManager;
 struct RollbackNode
 {
        std::string name;
-       int param1;
-       int param2;
+       int param1 = 0;
+       int param2 = 0;
        std::string meta;
 
        bool operator == (const RollbackNode &other)
@@ -46,11 +46,7 @@ struct RollbackNode
        }
        bool operator != (const RollbackNode &other) { return !(*this == other); }
 
-       RollbackNode():
-               param1(0),
-               param2(0)
-       {}
-
+       RollbackNode() {}
        RollbackNode(Map *map, v3s16 p, IGameDef *gamedef);
 };
 
@@ -70,7 +66,7 @@ struct RollbackAction
        v3s16 p;
        RollbackNode n_old;
        RollbackNode n_new;
-       
+
        std::string inventory_location;
        std::string inventory_list;
        u32 inventory_index;
@@ -103,13 +99,13 @@ struct RollbackAction
                inventory_add = add_;
                inventory_stack = inventory_stack_;
        }
-       
+
        // String should not contain newlines or nulls
        std::string toString() const;
-       
+
        // Eg. flowing water level changes are not important
        bool isImportant(IGameDef *gamedef) const;
-       
+
        bool getPosition(v3s16 *dst) const;
 
        bool applyRevert(Map *map, InventoryManager *imgr, IGameDef *gamedef) const;
index b4b6882e541febc42fcd26ad6d8bf5b51487f697..95d2371ff1153591957ab906f54f3edfa4e441ff 100644 (file)
@@ -156,41 +156,19 @@ Server::Server(
        m_simple_singleplayer_mode(simple_singleplayer_mode),
        m_dedicated(dedicated),
        m_async_fatal_error(""),
-       m_env(NULL),
        m_con(PROTOCOL_ID,
                        512,
                        CONNECTION_TIMEOUT,
                        ipv6,
                        this),
-       m_banmanager(NULL),
-       m_rollback(NULL),
-       m_enable_rollback_recording(false),
-       m_emerge(NULL),
-       m_script(NULL),
        m_itemdef(createItemDefManager()),
        m_nodedef(createNodeDefManager()),
        m_craftdef(createCraftDefManager()),
        m_event(new EventManager()),
-       m_thread(NULL),
-       m_time_of_day_send_timer(0),
        m_uptime(0),
        m_clients(&m_con),
-       m_shutdown_requested(false),
-       m_shutdown_ask_reconnect(false),
-       m_shutdown_timer(0.0f),
-       m_admin_chat(iface),
-       m_ignore_map_edit_events(false),
-       m_ignore_map_edit_events_peer_id(0),
-       m_next_sound_id(0),
-       m_mod_storage_save_timer(10.0f)
-{
-       m_liquid_transform_timer = 0.0;
-       m_liquid_transform_every = 1.0;
-       m_masterserver_timer = 0.0;
-       m_emergethread_trigger_timer = 0.0;
-       m_savemap_timer = 0.0;
-
-       m_step_dtime = 0.0;
+       m_admin_chat(iface)
+{
        m_lag = g_settings->getFloat("dedicated_server_step");
 
        if(path_world == "")
index 3086e87621345332def05297327ce6fc4282e342..b60482a75b3bcce518aa858f0d9fc729b405aa85 100644 (file)
@@ -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;
 };
 
 /*
index 161b24fd4f86698e3e9ca0c8ae5f5c40cbc66227..e8bdd2a282416d5258dfd4c6c89f5a5ca468f04d 100644 (file)
@@ -54,8 +54,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 ABMWithState::ABMWithState(ActiveBlockModifier *abm_):
-       abm(abm_),
-       timer(0)
+       abm(abm_)
 {
        // Initialize timer to random value to spread processing
        float itv = abm->getTriggerInterval();
@@ -365,15 +364,7 @@ ServerEnvironment::ServerEnvironment(ServerMap *map,
        m_map(map),
        m_script(scriptIface),
        m_server(server),
-       m_path_world(path_world),
-       m_send_recommended_timer(0),
-       m_active_block_interval_overload_skip(0),
-       m_game_time(0),
-       m_game_time_fraction_counter(0),
-       m_last_clear_objects_time(0),
-       m_recommended_send_interval(0.1),
-       m_max_lag_estimate(0.1),
-       m_player_database(NULL)
+       m_path_world(path_world)
 {
        // Determine which database backend to use
        std::string conf_path = path_world + DIR_DELIM + "world.mt";
index 3b7bf8fb06e51bf87ba3cc1da109444632db36b7..375b28f8a858bf16f4f300e0c5ddb700e28b3d6b 100644 (file)
@@ -70,7 +70,7 @@ public:
 struct ABMWithState
 {
        ActiveBlockModifier *abm;
-       float timer;
+       float timer = 0.0f;
 
        ABMWithState(ActiveBlockModifier *abm_);
 };
@@ -80,7 +80,7 @@ struct LoadingBlockModifierDef
        // Set of contents to trigger on
        std::set<std::string> trigger_contents;
        std::string name;
-       bool run_at_every_load;
+       bool run_at_every_load = false;
 
        virtual ~LoadingBlockModifierDef() {}
        virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n){};
@@ -104,10 +104,7 @@ struct LBMContentMapping
 class LBMManager
 {
 public:
-       LBMManager():
-               m_query_mode(false)
-       {}
-
+       LBMManager() {}
        ~LBMManager();
 
        // Don't call this after loadIntroductionTimes() ran.
@@ -128,7 +125,7 @@ public:
 private:
        // Once we set this to true, we can only query,
        // not modify
-       bool m_query_mode;
+       bool m_query_mode = false;
 
        // For m_query_mode == false:
        // The key of the map is the LBM def's name.
@@ -399,35 +396,35 @@ private:
        // Outgoing network message buffer for active objects
        std::queue<ActiveObjectMessage> m_active_object_messages;
        // Some timers
-       float m_send_recommended_timer;
+       float m_send_recommended_timer = 0.0f;
        IntervalLimiter m_object_management_interval;
        // List of active blocks
        ActiveBlockList m_active_blocks;
        IntervalLimiter m_active_blocks_management_interval;
        IntervalLimiter m_active_block_modifier_interval;
        IntervalLimiter m_active_blocks_nodemetadata_interval;
-       int m_active_block_interval_overload_skip;
+       int m_active_block_interval_overload_skip = 0;
        // Time from the beginning of the game in seconds.
        // Incremented in step().
-       u32 m_game_time;
+       u32 m_game_time = 0;
        // A helper variable for incrementing the latter
-       float m_game_time_fraction_counter;
+       float m_game_time_fraction_counter = 0.0f;
        // Time of last clearObjects call (game time).
        // When a mapblock older than this is loaded, its objects are cleared.
-       u32 m_last_clear_objects_time;
+       u32 m_last_clear_objects_time = 0;
        // Active block modifiers
        std::vector<ABMWithState> m_abms;
        LBMManager m_lbm_mgr;
        // An interval for generally sending object positions and stuff
-       float m_recommended_send_interval;
+       float m_recommended_send_interval = 0.1f;
        // Estimate for general maximum lag as determined by server.
        // Can raise to high values like 15s with eg. map generation mods.
-       float m_max_lag_estimate;
+       float m_max_lag_estimate = 0.1f;
 
        // peer_ids in here should be unique, except that there may be many 0s
        std::vector<RemotePlayer*> m_players;
 
-       PlayerDatabase *m_player_database;
+       PlayerDatabase *m_player_database = nullptr;
 
        // Particles
        IntervalLimiter m_particle_management_interval;