diff options
author | kwolekr <kwolekr@minetest.net> | 2014-10-28 00:18:53 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-10-28 00:18:53 -0400 |
commit | bc28ca0636f5bce85683a7114ad99df4e7791847 (patch) | |
tree | dd814f6b12dfb619d0e48aa6b97017a1a4d23a32 /src/biome.h | |
parent | 6ddf458504c072aa2c952d9e88e96d4ae0f1491f (diff) | |
download | minetest-bc28ca0636f5bce85683a7114ad99df4e7791847.tar.gz minetest-bc28ca0636f5bce85683a7114ad99df4e7791847.tar.bz2 minetest-bc28ca0636f5bce85683a7114ad99df4e7791847.zip |
Prevent invalid memory access under failure conditions
Diffstat (limited to 'src/biome.h')
-rw-r--r-- | src/biome.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/biome.h b/src/biome.h index fdfefeaf9..554a61f4e 100644 --- a/src/biome.h +++ b/src/biome.h @@ -44,24 +44,16 @@ public: u8 id; std::string name; u32 flags; - -/* - std::string nname_top; - std::string nname_filler; - std::string nname_water; - std::string nname_dust; - std::string nname_dust_water; -*/ content_t c_top; content_t c_filler; content_t c_water; content_t c_dust; content_t c_dust_water; - + s16 depth_top; s16 depth_filler; - + s16 height_min; s16 height_max; float heat_point; @@ -85,15 +77,14 @@ public: BiomeDefManager(NodeResolver *resolver); ~BiomeDefManager(); - + Biome *createBiome(BiomeTerrainType btt); void calcBiomes(BiomeNoiseInput *input, u8 *biomeid_map); Biome *getBiome(float heat, float humidity, s16 y); - void addBiome(Biome *b); - void resolveNodeNames(INodeDefManager *ndef); + bool addBiome(Biome *b); u8 getBiomeIdByName(const char *name); - + s16 calcBlockHeat(v3s16 p, u64 seed, float timeofday, float totaltime); s16 calcBlockHumidity(v3s16 p, u64 seed, float timeofday, float totaltime); }; |