Noise: Prevent unittest crash caused by division by zero
[oweals/minetest.git] / src / mg_schematic.h
index 1d46e6ac4fc7dfa78ead419b91efb215a5fc160c..16e967a7c5e8e9158ba2c0ee8729d721d77aa4f6 100644 (file)
@@ -1,6 +1,7 @@
 /*
 Minetest
-Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
+Copyright (C) 2014-2016 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
+Copyright (C) 2015-2017 paramat
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -25,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/string.h"
 
 class Map;
+class ServerMap;
 class Mapgen;
 class MMVManip;
 class PseudoRandom;
@@ -108,17 +110,17 @@ public:
 
        void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place);
        bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place);
-       void placeOnMap(Map *map, v3s16 p, u32 flags, Rotation rot, bool force_place);
+       void placeOnMap(ServerMap *map, v3s16 p, u32 flags, Rotation rot, bool force_place);
 
        void applyProbabilities(v3s16 p0,
                std::vector<std::pair<v3s16, u8> > *plist,
                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 {