aboutsummaryrefslogtreecommitdiff
path: root/src/serverobject.h
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-04-06 22:52:08 +0100
committerparamat <mat.gregory@virginmedia.com>2015-04-07 04:43:24 +0100
commit392ac41c993daba284d4840fe93169f802d860b6 (patch)
treec93efe5ce7eb8fa16a1a4bdb0f7850d4bed7f983 /src/serverobject.h
parentf81759792e77e681ab9f844c43fa71f2772c03b7 (diff)
downloadminetest-392ac41c993daba284d4840fe93169f802d860b6.tar.gz
minetest-392ac41c993daba284d4840fe93169f802d860b6.tar.bz2
minetest-392ac41c993daba284d4840fe93169f802d860b6.zip
Cavegen: Remove now unnecessary checks for water, lava, ice
Remove large cave checks for air Mgv5/mgv7:Add is_ground_content checks to 3d noise tunnels More large caves Shorten lines
Diffstat (limited to 'src/serverobject.h')
0 files changed, 0 insertions, 0 deletions
com"> You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef DUNGEONGEN_HEADER #define DUNGEONGEN_HEADER #include "voxel.h" #include "noise.h" #include "mapgen.h" #define VMANIP_FLAG_DUNGEON_INSIDE VOXELFLAG_CHECKED1 #define VMANIP_FLAG_DUNGEON_PRESERVE VOXELFLAG_CHECKED2 #define VMANIP_FLAG_DUNGEON_UNTOUCHABLE (\ VMANIP_FLAG_DUNGEON_INSIDE|VMANIP_FLAG_DUNGEON_PRESERVE) class MMVManip; class INodeDefManager; v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs); v3s16 turn_xz(v3s16 olddir, int t); v3s16 random_turn(PseudoRandom &random, v3s16 olddir); int dir_to_facedir(v3s16 d); struct DungeonParams { content_t c_water; content_t c_cobble; content_t c_moss; content_t c_stair; GenNotifyType notifytype; bool diagonal_dirs; float mossratio; v3s16 holesize; v3s16 roomsize; NoiseParams np_rarity; NoiseParams np_wetness; NoiseParams np_density; }; class DungeonGen { public: MMVManip *vm; Mapgen *mg; u32 blockseed; PseudoRandom random; v3s16 csize; content_t c_torch; DungeonParams dp; //RoomWalker v3s16 m_pos; v3s16 m_dir; DungeonGen(Mapgen *mg, DungeonParams *dparams); void generate(u32 bseed, v3s16 full_node_min, v3s16 full_node_max); void makeDungeon(v3s16 start_padding); void makeRoom(v3s16 roomsize, v3s16 roomplace); void makeCorridor(v3s16 doorplace, v3s16 doordir, v3s16 &result_place, v3s16 &result_dir); void makeDoor(v3s16 doorplace, v3s16 doordir); void makeFill(v3s16 place, v3s16 size, u8 avoid_flags, MapNode n, u8 or_flags); void makeHole(v3s16 place); bool findPlaceForDoor(v3s16 &result_place, v3s16 &result_dir); bool findPlaceForRoomDoor(v3s16 roomsize, v3s16 &result_doorplace, v3s16 &result_doordir, v3s16 &result_roomplace); void randomizeDir() { m_dir = rand_ortho_dir(random, dp.diagonal_dirs); } }; extern NoiseParams nparams_dungeon_rarity; extern NoiseParams nparams_dungeon_wetness; extern NoiseParams nparams_dungeon_density; #endif