aboutsummaryrefslogtreecommitdiff
path: root/src/emerge.cpp
AgeCommit message (Collapse)Author
2022-12-24Store `MapEditEvent` blocks in a vector (#13071)Jude Melton-Houghton
2022-12-24Make MapEditEvent more completeJude Melton-Houghton
SetBlocksNotSent is no longer used.
2022-10-09Remove unused MapBlock functionalityJude Melton-Houghton
2022-07-30Fix some warnings (#12615)rubenwardy
2022-07-09Enforce limits of settings that could cause buggy behaviour (#12450)SmallJoker
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
2022-05-09Add more Prometheus metrics (#12274)sfan5
2022-03-14Fix memory leak in EmergeManagerDaroc Alden
EmergeManager keeps a copy of the BiomeGen that it creates, but never deletes it.
2022-01-23Cancel emerge callbacks on shutdownJude Melton-Houghton
2021-10-25Fixes around emerge handlingsfan5
2021-10-12Remove a few unused functions reported by callcatcher (#11658)SmallJoker
2021-09-10Clean up/improve some scriptapi error handling codesfan5
2021-07-31Fix /emergeblocks crashing in debug builds (#11461)Wuzzy
The reason for the bug was an u16 overflow, thus failing the assert. This only happened in Debug build but not in Release builds.
2021-05-30Add core.compare_block_status function (#11247)SmallJoker
Makes it possible to check the status of the mapblock in a future-extensible way.
2021-03-23Fix broken `BiomeGen` abstraction (#11107)sfan5
2021-01-22Remove dead code (#10845)rubenwardy
2020-11-12Increase default emerge queue limits and limit enqueue requests for active ↵Lars
blocks.
2020-05-24Fix documentation of emergequeue_limit settingssfan5
2020-05-05Fix crash when exiting server during running mapgensfan5
easily reproducible with a high num_emerge_threads and /emergeblocks
2020-05-05Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copysfan5
2020-04-11Move serveractiveobject & unitsaoLoic Blot
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
2020-04-08Overall improvements to log messages (#9598)sfan5
Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
2019-08-13Better F6 profiler (#8750)SmallJoker
Update the profiler names to make more sense of what they actually represent Move the profiler code from header to its source file Use monospace font to align lines Format the statistics line to align better with surrounding values Refresh the profiler each 3 seconds (roughly)
2019-03-31Fix commentsLoic Blot
2019-03-31EmergeManager::initMapgens use FATAL_ERROR if and drop boolean returnLoïc Blot
We never handle the boolean return, also init twice is a coding error, not a runtime error
2019-03-18num_emerge_threads: Initialise value to cope with setting syntax error (#8396)Paramat
2019-03-05getS16NoEx() returns true unless syntactical error in conf. (#8304)sofar
The getS16NoEx() handler will return true unless there is a `[num_emerge_threads]` line in the `minetest.conf` at which point the excption handler part is reached. Due to the fact that `defaultsettings.cpp` has a default value set for this setting, that never will happen. Because of this, the code will never check the number of threads on the system, and keep `nthreads = 0`. If that happens, the value is changed to `1` and only 1 emerge thread will be used. The default should be set to `1` instead, due to the potential unsafe consequences for the standard sqlite map files, but that should be a separate commit that also adds documentation for that setting. This commit focuses on removing this `hiding` bug instead.
2018-06-22Fix crash caused by Lua error during startup (#7473)red-001
2018-03-03Generate Notifier: Clear events once after all 'on generated' functionsparamat
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-09-27Add session_t typedef + remove unused functions (#6470)Loïc Blot
* Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
2017-08-30Remove DSTACK support (#6346)Loïc Blot
Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
2017-08-17Modernize src/c* src/d* and src/e* files (#6263)Loïc Blot
* Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio)
2017-07-25Move MapEditEventAreaIgnorer to emerge.cppLoic Blot
It's only used in emerge threads and it's a local object, don't expose it to the whole Minetest
2017-06-16C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot
1) (#5984) * C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-04-25Rename Scripting API files for consistencyShadowNinja
2017-03-20Map generation limit: Rewriteparamat
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.
2017-03-17avoid crashing when accessing mapgen early (#5384)zeuner
2017-03-13[CSM] Client side moddingLoic Blot
* rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
2017-01-15Added lua tracebacks to some errors where you have been blind to what… (#5043)sapier
* Added lua tracebacks to some errors where you have been blind to what actually went wrong
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
2016-12-18Fix unnecessary block loading (#4847)Dániel Juhász
This commit makes the game load blocks only if they are not in the memory.
2016-10-05Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot
This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
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-07-03Mapgen: Refactor mapgen creation and managementkwolekr
- Move mapgen creation logic out of EmergeManager and into Mapgen - Internally represent mapgen type as an enum value, instead of a string - Remove the need for a MapgenFactory per mapgen
2016-05-27Move biome calculation to BiomeGenkwolekr
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes for a given area using the algorithm implemented by that specific BiomeGen. This abstracts away the old system where each mapgen supplied the noises required for biome generation.
2016-02-09FindSpawnPos: Let mapgens decide what spawn altitude is suitableparamat
To avoid spawn search failing in new specialised mapgens Increase spawn search range to 4000 nodes Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen and all mapgens Remove getGroundLevelAtPoint() functions from all mapgens except mgv6 (possibly to be re-added later in the correct form to return actual ground level) Make mgvalleys flag names consistent with other mapgens Remove now unused 'vertical spawn range' setting
2016-01-19EmergeManager: Do not queue duplicate block requestskwolekr
2016-01-14Add Valleys mapgen.Duane Robertson
2016-01-10Mgflat: Set blank default spflags. Unhideparamat