diff options
Diffstat (limited to 'src/mapgen.h')
-rw-r--r-- | src/mapgen.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/mapgen.h b/src/mapgen.h index 653b79ed8..4e0d75b39 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -1,6 +1,8 @@ /* Minetest -Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com> +Copyright (C) 2010-2015 celeron55, Perttu Ahola <celeron55@gmail.com> +Copyright (C) 2013-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 @@ -99,8 +101,8 @@ public: void setNotifyOnDecoIds(std::set<u32> *notify_on_deco_ids); bool addEvent(GenNotifyType type, v3s16 pos, u32 id=0); - void getEvents(std::map<std::string, std::vector<v3s16> > &event_map, - bool peek_events=false); + void getEvents(std::map<std::string, std::vector<v3s16> > &event_map); + void clearEvents(); private: u32 m_notify_on; @@ -129,6 +131,9 @@ struct MapgenParams { BiomeParams *bparams; + s16 mapgen_edge_min; + s16 mapgen_edge_max; + MapgenParams() : mgtype(MAPGEN_DEFAULT), chunksize(5), @@ -136,7 +141,11 @@ struct MapgenParams { water_level(1), mapgen_limit(MAX_MAP_GENERATION_LIMIT), flags(MG_CAVES | MG_LIGHT | MG_DECORATIONS), - bparams(NULL) + bparams(NULL), + + mapgen_edge_min(-MAX_MAP_GENERATION_LIMIT), + mapgen_edge_max(MAX_MAP_GENERATION_LIMIT), + m_mapgen_edges_calculated(false) { } @@ -144,6 +153,13 @@ struct MapgenParams { virtual void readParams(const Settings *settings); virtual void writeParams(Settings *settings) const; + + s32 getSpawnRangeMax(); + +private: + void calcMapgenEdges(); + + bool m_mapgen_edges_calculated; }; |