summaryrefslogtreecommitdiff
path: root/src/map.h
Commit message (Collapse)AuthorAge
* SAO limits: Allow SAOs to exist outside the set 'mapgen limit'paramat2018-06-03
|
* Properly remove SAO when worldedges are overtaken (#5889)Loïc Blot2017-06-03
| | | | | | | | | | | | * LuaEntitySAO: Remove beyond outermost mapchunk edges Based on a commit by, and with help from, nerzhul. Add 2 functions to class Mapgen: A function to calculate actual mapgen edges, called from the Mapgen constructor. A function called indirectly from content_sao.cpp per entity step to check SAO position is within mapgen edges. * Calculate borders from params not mapgen, which is not available everytime
* Time: Change old `u32` timestamps to 64-bit (#5818)SmallJoker2017-05-26
| | | | MacOSX build fix + cleanups
* Player data to Database (#5475)Loïc Blot2017-04-23
| | | | | | | | | | | | * Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty
* Add on_flood() callback.Auke Kok2017-04-22
| | | | | | | | | | | | | | | | | | | | | This callback is called if a liquid definitely floods a non-air node on the map. The callback arguments are (pos, oldnode, newnode) and can return a `bool` value indicating whether flooding the node should be cancelled (`return true` will prevent the node from flooding). Documentation is added, the callback function was tested with a modified minetest_game. Note that `return true` will likely cause the node's `on_flood()` callback to be called every second until the node gets removed, so care must be taken to prevent many callbacks from using this return value. The current default liquid update interval is 1.0 seconds, which isn't unmanageable. The larger aim of this patch is to remove the lava cooling ABM, which is a significant cost to idle servers that have lava on their map. This callback will be much more efficient.
* Light update for map blocksDániel Juhász2017-04-20
| | | | | | | | | This is not really different from the light update of a voxel manipulator. This update does not assume that the lighting was correct before, therefore it is useful for correction. Also expose this function to the Lua API for light correction, and allow voxel manipulators not to update the light.
* Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot2017-04-20
| | | | * Also remove 2 non declared but defined functions * Make some functions around const ref changes const
* Fix various variables passed by copy instead of const ref (#5610)Loïc Blot2017-04-19
| | | Pointed by cppcheck
* Map generation limit: Make per-worldparamat2017-03-27
| | | | | | | | | | | 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.
* Allow server side occlusion culling.Lars Hofhansl2017-03-11
|
* Light calculation: New bulk node lighting codeDániel Juhász2017-03-11
| | | | | | | | | | | 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.
* Improve getPointedThing() (#4346)Dániel Juhász2017-01-04
| | | | | | | | | | | | | | | | | | | * 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()).
* Improved lightingDániel Juhász2016-10-27
| | | | | | | | | | | | | | 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
* use unordered containers where possible (patch 4 on X)Loic Blot2016-10-06
| | | | Also remove some unused parameters/functions
* Add MapSettingsManager and new mapgen setting script API functionskwolekr2016-07-03
| | | | | | | | | | | | | | | 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.
* Make node timers more efficientEkdohibs2016-06-11
|
* Add DISABLE_CLASS_COPY macro (and use it)kwolekr2015-10-27
| | | | | | | | | 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.
* Add emerge completion callback mechanismkwolekr2015-10-04
| | | | Major refactor of emerge.cpp and Map::init/finishBlockMake
* Add count based unload limit for mapblocksest312015-08-13
|
* Add core.find_nodes_with_meta() script APIkwolekr2015-05-05
|
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Don't start a server for map migrationShadowNinja2015-03-06
|
* Clean up database API and save the local map on an intervalShadowNinja2015-03-06
|
* ABMHandler and player_collisions use sequential read/write. Switch from ↵Loic Blot2015-03-04
| | | | | | std::list to std::vector * Also remove dead code Map::unloadUnusedData which is dead since a long time
* Replace std::list by std::vector into timerUpdate callsLoic Blot2015-02-17
|
* Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ↵Loic Blot2015-02-17
| | | | | | ServerMap::listAllLoadedBlocks and their database backends. This adds a speedup on database migration and /clearobjects command
* Create empty default constructor for MapNodeCraig Robbins2015-01-18
|
* Add ability to delete MapBlocks from mapkwolekr2015-01-15
| | | | Also add a Lua API and chatcommand for this
* Shorten ManualMapVoxelManipulator to MMVManipkwolekr2015-01-05
|
* LuaVoxelManip: Remove blank allocatorkwolekr2014-12-29
|
* LuaVoxelManip: Add option to allocate blank datakwolekr2014-12-27
|
* Do not allow the m_transforming_liquid queue to increase until all RAM is ↵Craig Robbins2014-12-18
| | | | consumed
* Clean up rollbackShadowNinja2014-11-19
|
* Remove most exceptions from getNode() (and variants)Craig Robbins2014-11-14
|
* Update Mapgen VoxelManipulator on buffer invalidationkwolekr2014-09-01
|
* Move MapBlock (de)serializing code out of Database classsfan52014-07-12
|
* Don't copy back already generated blocks on map generationkwolekr2014-07-07
|
* Don't unload blocks if save failedkwolekr2014-07-07
| | | | Improve error handling in saveBlock()
* Remove MapVoxelManipulator not really used by anyonesapier2014-06-23
|
* Minor stability improvements in block emerge handlingsapier2014-06-15
|
* Remove liquid_finite and weatherproller2014-04-18
|
* ServerEnvironment: Remove direct dependency on EmergeManagerkwolekr2014-02-09
|
* Huge overhaul of the entire MapgenParams systemkwolekr2014-02-03
| | | | | | 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.
* Revert "Improve (re)spawn, add cache_block_before_spawn and max_spawn_height ↵ShadowNinja2014-01-06
| | | | | | | | | | | settings" The commit didn't work because the blocks weren't loaded yet. This reverts commit 22dbbf0a6fc9547f0dbdb7f6076337b8c6acd48b. Conflicts: minetest.conf.example
* Update mapgen params in ServerMap after Mapgen initkwolekr2013-12-14
|
* Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settingssweetbomber2013-12-05
|
* Add minetest.swap_nodeNovatux2013-11-30
|
* Fixed potential NULL pointer and leak when setting node metadataMetaDucky2013-11-29
|
* Actually fix weatherkwolekr2013-11-17
| | | | The real problem was that MapBlocks were not activated before getting sent to the client
* Weather: Clean up getHeat/getHumidity somewhatkwolekr2013-09-16
|