summaryrefslogtreecommitdiff
path: root/src/mapblock.h
Commit message (Collapse)AuthorAge
* Optimize ABM checks.Lars Hofhansl2018-07-21
| | | | | | | See #7555 Cache (up to 64) node types for each active block. Check this cache first to see whether any ABM needs to be triggered for a block.
* Remove unused light updating codeDániel Juhász2018-02-04
| | | Also remove the unit test that tests the removed algorithms.
* Move files to subdirectories (#6599)Vitaliy2017-11-08
| | | | * Move files around
* Fix blocks written by vmanip not being marked as modifiedsfan52017-09-23
| | | | | This bug can be triggered by e.g. calling minetest.place_schematic() and stopping the server immediately afterwards.
* Code modernization: src/m* (part 2)Loic Blot2017-08-19
| | | | | | | | | * empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
| | | | | | | | | | * C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
* 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