summaryrefslogtreecommitdiff
path: root/src/emerge.cpp
Commit message (Collapse)AuthorAge
* Fix broken `BiomeGen` abstraction (#11107)sfan52021-03-23
|
* Remove dead code (#10845)rubenwardy2021-01-22
|
* Increase default emerge queue limits and limit enqueue requests for active ↵Lars2020-11-12
| | | | blocks.
* Fix documentation of emergequeue_limit settingssfan52020-05-24
|
* Fix crash when exiting server during running mapgensfan52020-05-05
| | | | easily reproducible with a high num_emerge_threads and /emergeblocks
* Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copysfan52020-05-05
|
* Move serveractiveobject & unitsaoLoic Blot2020-04-11
| | | | | Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
* Overall improvements to log messages (#9598)sfan52020-04-08
| | | | Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
* Better F6 profiler (#8750)SmallJoker2019-08-13
| | | | | | | 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)
* Fix commentsLoic Blot2019-03-31
|
* EmergeManager::initMapgens use FATAL_ERROR if and drop boolean returnLoïc Blot2019-03-31
| | | | We never handle the boolean return, also init twice is a coding error, not a runtime error
* num_emerge_threads: Initialise value to cope with setting syntax error (#8396)Paramat2019-03-18
|
* getS16NoEx() returns true unless syntactical error in conf. (#8304)sofar2019-03-05
| | | | | | | | | | | | | | | | 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.
* Fix crash caused by Lua error during startup (#7473)red-0012018-06-22
|
* Generate Notifier: Clear events once after all 'on generated' functionsparamat2018-03-03
|
* Move files to subdirectories (#6599)Vitaliy2017-11-08
| | | | * Move files around
* Add session_t typedef + remove unused functions (#6470)Loïc Blot2017-09-27
| | | | | | * 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
* Remove DSTACK support (#6346)Loïc Blot2017-08-30
| | | 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.
* Modernize src/c* src/d* and src/e* files (#6263)Loïc Blot2017-08-17
| | | | | | | | | | | | | | | | | * 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)
* Move MapEditEventAreaIgnorer to emerge.cppLoic Blot2017-07-25
| | | | It's only used in emerge threads and it's a local object, don't expose it to the whole Minetest
* C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | 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
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Rename Scripting API files for consistencyShadowNinja2017-04-25
|
* 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.
* avoid crashing when accessing mapgen early (#5384)zeuner2017-03-17
|
* [CSM] Client side moddingLoic Blot2017-03-13
| | | | | | | | | | * 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
* Added lua tracebacks to some errors where you have been blind to what… (#5043)sapier2017-01-15
| | | | * Added lua tracebacks to some errors where you have been blind to what actually went wrong
* Environment & IGameDef code refactoring (#4985)Ner'zhul2017-01-09
| | | | | | | | | | | | | | | | | | | | | * 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
* Fix unnecessary block loading (#4847)Dániel Juhász2016-12-18
| | | | This commit makes the game load blocks only if they are not in the memory.
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
| | | | | | | | | | | | 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
* 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.
* Mapgen: Refactor mapgen creation and managementkwolekr2016-07-03
| | | | | | - 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
* Move biome calculation to BiomeGenkwolekr2016-05-27
| | | | | | | 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.
* FindSpawnPos: Let mapgens decide what spawn altitude is suitableparamat2016-02-09
| | | | | | | | | | | | 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
* EmergeManager: Do not queue duplicate block requestskwolekr2016-01-19
|
* Add Valleys mapgen.Duane Robertson2016-01-14
|
* Mgflat: Set blank default spflags. Unhideparamat2016-01-10
|
* Mgfractal: Move julia set selection into formula parameterparamat2015-11-23
| | | | | | Improve default parameters Update and improve documentation Unhide mapgen, but is still unstable
* Mapgen: Add flat mapgen in hidden formparamat2015-11-11
|
* Refactor Thread class to improve readability and portabilitykwolekr2015-10-16
| | | | | | | | | - Fix some incompatibilities with obscure platforms (AIX and WinCE) - Clean up Thread class interface - Add m_ prefix to private member variables - Simplify platform-dependent logic, reducing preprocessor conditional clauses and improving readibility - Add Thread class documentation
* Rename macros with two leading underscoresShadowNinja2015-10-14
| | | | These names are reserved for the compiler/library implementations.
* Always use errorstream for DEBUG_EXCEPTION_HANDLERShadowNinja2015-10-14
|
* Mapgen: Add 4D fractal mapgenparamat2015-10-06
|
* Allow setting chunksize in core.set_mapgen_paramskwolekr2015-10-04
|
* Hide mapgens from main menu not intended for end userskwolekr2015-10-04
|
* Add emerge completion callback mechanismkwolekr2015-10-04
| | | | Major refactor of emerge.cpp and Map::init/finishBlockMake
* Add /emergeblocks command and core.emerge_area() Lua APIkwolekr2015-09-23
|
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Prepend "Lua: " before lua exceptionsBřetislav Štec2015-08-02
| | | | | src/server.cpp src/emerge.cpp
* Revert the upper-case PROJECT_NAME nonsense that was part of #2402sfan52015-04-27
|