summaryrefslogtreecommitdiff
path: root/src/mapblock.h
Commit message (Collapse)AuthorAge
* Fix blocks written by vmanip not being marked as modifiedsfan52018-06-03
| | | | | This bug can be triggered by e.g. calling minetest.place_schematic() and stopping the server immediately afterwards.
* MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock ↵Perttu Ahola2017-04-17
| | | | | | | | | | | | | | | | | | | | | copying done in the main thread Cache size is configurable by the meshgen_block_cache_size (default 20 MB). New profiler stats: - MeshUpdateQueue MapBlock cache hit % - MeshUpdateQueue MapBlock cache size kB Removes one type of stutter that was seen on the client when received MapBlocks were being handled. (the "MeshMakeData::fill" stutter) Kind of related to at least #5239 Originally preceded by these commits, now includes them: - Move the mesh generator thread into src/mesh_generator_thread.{cpp,h} - mesh_generator_thread.cpp: Update code style - MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits. - MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
* Add documentation for map block format 27 (#5576)Dániel Juhász2017-04-13
|
* 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.
* Map generation limit: Rewriteparamat2017-03-20
| | | | | | | | | | | | | | The previous implementation applied the setting to blockpos_over_limit(), objectpos_over_limit() and in createSector(), causing many bugs near the world edge. First revert the previous implementation. Rename blockpos_over_limit() to blockpos_over_max_limit() for clarity. Add a new function to mapblock.h called blockpos_over_mapgen_limit() that checks against the map_generation_limit setting, and call this only from the code that decides where mapgen stops. Use MAX_MAP_GENERATION_LIMIT in objectpos_over_limit() to reduce the chance of bugs, there is no need to use map_generation_limit here.
* Update server min protocol version to v24 (#5411)Loïc Blot2017-03-19
| | | | | | | | | | * Update server min protocol version to v24 It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14 * Drop protocol v23 and lesser code
* Objectpos over limit: Avoid crash caused by sector over limitparamat2017-02-16
| | | | | | | | | | Reduce the object limit by mapblock size, to avoid objects being added just inside the map generation limit but in a block and sector that extend beyond the map generation limit. Change notification of 'objectpos over limit' from red in-chat ERROR to in-terminal only WARNING, since this will happen often using mob mods near the world's edge.
* Lighting: Update lighting at block loadingDániel Juhász2017-02-13
| | | | | This commit updates mapblocks' light if necessary when they are loaded. This removes ghost lighting.
* Map generation limit: Cache as 'const' not 'const static'paramat2017-01-08
|
* Map generation limit: Fix checks for block/sector over-limitparamat2017-01-08
| | | | | | | | | | | | | | Fix the maths that check if any part of a mapblock or sector is over the set map_generation_limit. Therefore avoid the loading of any over-limit blocks that were previously generated when map_generation_limit was larger. The set limit can vary for a world because it is not yet a per-world mapgen parameter, even when it is sometimes it will be changed deliberately. Therefore avoid a player being returned to world centre if they re-enter a world while being over-limit. Fix the createSector() crash caused by a mob spawning over-limit in an over-limit mapblock
* Fixes for using std:vector in ABMHander and further perf improvementsLars Hofhansl2017-01-04
|
* Make node timers more efficientEkdohibs2016-06-11
|
* Fix object position border checkingest312015-09-16
| | | | | Borders have to be converted into BS format in order to be accurately comparable to object positions.
* Disallow placing entities outside safe boundariesest312015-09-15
| | | | | | | | | | | | Entity positions are serialized as F1000. Disallow placing entities outside safe borders with the minetest.add_entity call. Note that this patch only enforces those boundaries for placing entities, moving entities that move outside boundaries aren't affected. Thanks to @nanepiwo for pointing this out.
* Serialisation: documentation fixes, clarifying renames and whitespace fixesest312015-09-14
| | | | | | | | | | | | | | | 1. Do two renames: * SER_FMT_CLIENT_VER_LOWEST -> SER_FMT_VER_LOWEST_WRITE * SER_FMT_VER_LOWEST -> SER_FMT_VER_LOWEST_READ Now the two define values are consistently named with the _WRITE defines SER_FMT_VER_{HIGHEST,LOWEST}_WRITE, and to better point out what the two serialisation versions actually are for. 2. wrap some lines in doc/worldformat.txt, and point out that the node timers are serialized at a later point, as this can cause confusion about what now happens (if one doesn't strictly read the if block's conditions). 3. some whitespace fixes in NodeTimerList::serialize, and one new comment.
* Add map limit config optionrubenwardy2015-08-02
|
* Precalculate mapblock relative size. This permit to remove many s16 calculs ↵nerzhul2015-07-29
| | | | on runtime
* Mapblock: nodecount refactorest312015-05-31
| | | | | | | Spare direct multoplication, use constant MapBlock::nodecount instead of local nodecount variables. Also use strides at one place instead of multiplications.
* Record MapBlock modification reasons as flags instead of stringskwolekr2015-05-17
| | | | | This improves performance of MapBlock::raiseModified by a factor of 6. Also, clean up mapblock.h a bit and inline small functions.
* 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
* Replace std::list by std::vector into ClientMap::updateDrawList, ↵Loic Blot2015-02-17
| | | | | | Map::timerUpdate and ServerMap::save(). This will speedup the loop reading into those functions
* Fix a crash (assert) when client set serial version < 24 in INITLoic Blot2015-01-27
| | | | | | | | | When SER_FMT_VER_LOWEST is set to zero, then the test is stupid in INIT because all client works. In mapblock we check if client's serialization version is < 24, but if client sent serialization version < 24 (15 for example) the server set it and tried to send nodes, then BOOM To resolve the problem: * Create a different CLIENT_MIN_VERSION to handle this problem * Remove the exception * Use an assert in case of bad developer code
* Water fixesgregorycu2015-01-18
| | | | | | | Change must_reflow to a deque Add overload for MapBlock::raiseModified that takes a const char*. This is a speed improvement. Comment out unused variable Optimisations to block offset calculations
* Fix typo in mapblock.hCraig Robbins2014-12-12
|
* Remove most exceptions from getNode() (and variants)Craig Robbins2014-11-14
|
* Remove liquid_finite and weatherproller2014-04-18
|
* 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
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Weather backward compatibilityproller2013-08-02
|
* Weather supportproller2013-07-27
|
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Reorganize ClientMap rendering code for a bit more performancePerttu Ahola2012-09-04
| | | | | - Don't select blocks for drawing in every frame - Sort meshbuffers by material before drawing
* Fix map deserialization and remove old serialization codePerttu Ahola2012-07-23
|
* Implement node timersdarkrose2012-07-23
|
* Optimize headersPerttu Ahola2012-06-17
|
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
|
* Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola2012-06-05
| | | | GPLv2/later, by agreement of major contributors
* WIP node metadata, node timersKahrl2012-06-03
|
* Reduce EnvRef:set_node() time tenfold by postponing the dayNightDiff update ↵Perttu Ahola2012-03-29
| | | | until it is actually needed
* MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric ↵Kahrl2012-03-15
| | | | light, removed footprints
* Node placement / mineral / serialization / iron freq / node_dig callbackKahrl2012-01-22
| | | | | | | | - Node placement code moved to Lua - Mineral system removed (added default:stone_with_coal and default:stone_with_iron). - MapBlock and MapNode serialization updated. - Mapgen: Frequency of iron increased. - node_dig callback and related changes.
* The huge item definition and item namespace unification patch (itemdef), see ↵Kahrl2012-01-12
| | | | http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
* Replace old active block random node modifying things with actual ↵Perttu Ahola2011-11-29
| | | | ActiveBlockModifiers
* Add reason parameter to setModified and print it out to verbosestream when ↵Perttu Ahola2011-11-29
| | | | saving block
* Node definition namesPerttu Ahola2011-11-29
|
* GameDef compilesPerttu Ahola2011-11-29
|
* Create framework for getting rid of global definitions of ↵Perttu Ahola2011-11-29
| | | | node/tool/item/whatever types