aboutsummaryrefslogtreecommitdiff
path: root/src/map.h
AgeCommit message (Collapse)Author
2017-03-27Map generation limit: Make per-worldparamat
The setting limits map generation but affects nothing else. Add 'mapgen_limit' to global mapgen parameters. Move 'blockpos_over_mapgen_limit()' to the only place it is called from: map.cpp. Allow teleportation to any part of the world even if over the set mapgen limit. Simplify the reading of this limit in mgvalleys. Remove the 'map_generation_limit' setting.
2017-03-11Allow server side occlusion culling.Lars Hofhansl
2017-03-11Light calculation: New bulk node lighting codeDániel Juhász
This commit introduces a new bulk node lighting algorithm to minimize lighting bugs during l-system tree generation, schematic placement and non-mapgen-object lua voxelmanip light calculation. If the block above the changed area is not loaded, it gets loaded to avoid lighting bugs. Light is updated as soon as write_to_map is called on a voxel manipulator, therefore update_map does nothing.
2017-01-04Improve getPointedThing() (#4346)Dániel Juhász
* Improved getPointedThing() The new algorithm checks every node exactly once. Now the point and normal vector of the collision is also returned in the PointedThing (currently they are not used outside of the function). Now the CNodeDefManager keeps the union of all possible nodeboxes, so the raycast won't miss any nodes. Also if there are only small nodeboxes, getPointedThing() is exceptionally fast. Also adds unit test for VoxelLineIterator. * Cleanup, code move This commit moves getPointedThing() and Client::getSelectedActiveObject() to ClientEnvironment. The map nodes now can decide which neighbors they are connecting to (MapNode::getNeighbors()).
2016-10-27Improved lightingDániel Juhász
This commit rewrites the procedure that is responsible for light updating. this commit -provides iterative solutions for unlighting and light spreading -introduces a new priority queue-like container for the iteration -creates per-node MapBlock caching to reduce retrieving MapBlocks from the map -calculates with map block positions and in-block relative node coordinates -skips light updating if it is not necessary since the node's new light will be the same as its old light was
2016-10-06use unordered containers where possible (patch 4 on X)Loic Blot
Also remove some unused parameters/functions
2016-07-03Add MapSettingsManager and new mapgen setting script API functionskwolekr
This commit refactors the majority of the Mapgen settings system. - MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap, instead of the EmergeManager. - New Script API functions added: core.get_mapgen_setting core.get_mapgen_setting_noiseparams, core.set_mapgen_setting, and core.set_mapgen_setting_noiseparams. - minetest.get/set_mapgen_params are deprecated by the above new functions. - It is now possible to view and modify any arbitrary mapgen setting from a mod, rather than the base MapgenParams structure. - MapgenSpecificParams has been removed.
2016-06-11Make node timers more efficientEkdohibs
2015-10-27Add DISABLE_CLASS_COPY macro (and use it)kwolekr
Use this macro to disallow copying of an object using the assignment operator or copy constructor. This catches otherwise silent-but-deadly mistakes such as "ServerMap map = env->getMap();" at compile time. If so desired, it is still possible to copy a class, but it now requires an explicit call to memcpy or std::copy.
2015-10-04Add emerge completion callback mechanismkwolekr
Major refactor of emerge.cpp and Map::init/finishBlockMake
2015-08-13Add count based unload limit for mapblocksest31
2015-05-05Add core.find_nodes_with_meta() script APIkwolekr
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-06Don't start a server for map migrationShadowNinja
2015-03-06Clean up database API and save the local map on an intervalShadowNinja
2015-03-04ABMHandler and player_collisions use sequential read/write. Switch from ↵Loic Blot
std::list to std::vector * Also remove dead code Map::unloadUnusedData which is dead since a long time
2015-02-17Replace std::list by std::vector into timerUpdate callsLoic Blot
2015-02-17Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ↵Loic Blot
ServerMap::listAllLoadedBlocks and their database backends. This adds a speedup on database migration and /clearobjects command
2015-01-18Create empty default constructor for MapNodeCraig Robbins
2015-01-15Add ability to delete MapBlocks from mapkwolekr
Also add a Lua API and chatcommand for this
2015-01-05Shorten ManualMapVoxelManipulator to MMVManipkwolekr
2014-12-29LuaVoxelManip: Remove blank allocatorkwolekr
2014-12-27LuaVoxelManip: Add option to allocate blank datakwolekr
2014-12-18Do not allow the m_transforming_liquid queue to increase until all RAM is ↵Craig Robbins
consumed
2014-11-19Clean up rollbackShadowNinja
2014-11-14Remove most exceptions from getNode() (and variants)Craig Robbins
2014-09-01Update Mapgen VoxelManipulator on buffer invalidationkwolekr
2014-07-12Move MapBlock (de)serializing code out of Database classsfan5
2014-07-07Don't copy back already generated blocks on map generationkwolekr
2014-07-07Don't unload blocks if save failedkwolekr
Improve error handling in saveBlock()
2014-06-23Remove MapVoxelManipulator not really used by anyonesapier
2014-06-15Minor stability improvements in block emerge handlingsapier
2014-04-18Remove liquid_finite and weatherproller
2014-02-09ServerEnvironment: Remove direct dependency on EmergeManagerkwolekr
2014-02-03Huge overhaul of the entire MapgenParams systemkwolekr
MapgenParams is no longer a polymorphic class, eliminating the need for messy and bug-prone reallocations. Separation between the common and mapgen-specific parameters is now strongly defined. Mapgen parameters objects are now properly encapsulated within the proper subsystems.
2014-01-06Revert "Improve (re)spawn, add cache_block_before_spawn and max_spawn_height ↵ShadowNinja
settings" The commit didn't work because the blocks weren't loaded yet. This reverts commit 22dbbf0a6fc9547f0dbdb7f6076337b8c6acd48b. Conflicts: minetest.conf.example
2013-12-14Update mapgen params in ServerMap after Mapgen initkwolekr
2013-12-05Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settingssweetbomber
2013-11-30Add minetest.swap_nodeNovatux
2013-11-29Fixed potential NULL pointer and leak when setting node metadataMetaDucky
2013-11-17Actually fix weatherkwolekr
The real problem was that MapBlocks were not activated before getting sent to the client
2013-09-16Weather: Clean up getHeat/getHumidity somewhatkwolekr
2013-09-10Add license headers and remove useless includesKahrl
2013-09-09Add dummy and LevelDB database backendsIlya Zhuravlev
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-08-11Decoration: Fix schematic probability mess with new MTS file versionkwolekr
2013-07-27Weather supportproller
2013-06-27Fix issue of VManip occasionally not blitting back blocks, and pitch black ↵kwolekr
lighting bug
2013-06-27Add LuaVoxelManipkwolekr
2013-06-03Add and implement setting max_clearobjects_extra_loaded_blocks.Kahrl
Now Environment::clearAllObjects() unloads unused blocks in an interval defined by max_clearobjects_extra_loaded_blocks (default 4096).