aboutsummaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
AgeCommit message (Collapse)Author
2022-12-24Add callback on_mapblocks_changedJude Melton-Houghton
2022-12-04Expose dtime_s to LBM handlersfan5
2022-11-27Abort active ABM iteration when content changes (#12998)Jude Melton-Houghton
2022-11-10Reduce active mgmt interval for a bit when a player joins. (#12925)lhofhansl
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-11-03Reduce exposure of various internals (#12885)Loïc Blot
* refactoring(StaticObjectList): don't expose m_active and m_stored anymore This prevents our old crap code where anyone can access to StaticObjectList. use proper modifiers. It also permits to do a short cleanup on MapBlock using a helper * refactoring(MapBlock): reduce a bit exposed m_active_blocks variable * refactoring: MapBlock::m_node_timers is now private We already had various helpers to perform this privatization, just use it. Also factorize the MapBlock stepping code for timers using already existing code and importing them from ServerEnvironment to MapBlock. It's currently done pretty straight forward without any inheritance as MapBlock is just used everywhere, maybe in a future we'll have ServerMapBlock over MapBlock. Currently for a simple function let's just use proper objects and add a comment warning * refactoring(Server): fix duplicated function for add/remove node * refactoring(guiFormSpecMenu): add removeAll function to prevent duplicated code * refactoring(ShadowRenderer) + perf: code quality + increase performance * All callers are already using the point and we should never test a function with nullptr node, it's a bug. Removed workaround which was hacky and fix the bug * Drop clientmap lookup from shadowrendered, just use directly its pointer and forbid to push it in the generic list * Reduce memory pressure on the renderShadowObject by preventing deallocating and reallocating multiple vectors on each node * refactoring(MapBlock): reduce exposure of MapBlock::m_static_objects It's not complete as some parts of the code are pretty nested, but it's better than before :) * fix: better working on new functions & drop unwanted 2 lines Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com> Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
2022-10-30Allow rotating entity selectionboxes (#12379)Lars Müller
2022-10-27Safety check the map's blocksize (#12895)lhofhansl
2022-10-09Remove unused MapBlock functionalityJude Melton-Houghton
2022-09-27Add unittests for item movement code (#11885)savilli
2022-06-05Fix crash in commit a69b7abe00fb818fd88f3cd04e7f9997ffd21072sfan5
2022-06-05Improve LBMManager::applyLBMs() codesfan5
Fixes a possible bug for lbms on content ID zero and removes unsafe casts.
2022-05-29Minor code improvements around active block keepingsfan5
2022-05-29Immediately activate blocks when a player joinssfan5
issue: #10884 This makes it possible for objects to immediately be activated, but doesn't guarantee it since blocks may still need be emerged.
2022-05-09Add more Prometheus metrics (#12274)sfan5
2022-05-02Async environment for mods to do concurrent tasks (#11131)sfan5
2022-04-28Clean up some auth packet handling related codesfan5
2022-04-08Spacing fixesShadowNinja
2021-06-20Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)sfence
This check can be used by ABM to reduce CPU usage.
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-01-29Settings: Proper priority hierarchySmallJoker
Remove old defaults system Introduce priority-based fallback list Use new functions for map_meta special functions Change groups to use end tags Unittest changes: * Adapt unittest to the new code * Compare Settings objects
2021-01-02Add on_deactivate callback for luaentities (#10723)hecks
2020-10-19Implement unloading of static_save=false objects according to existing docs ↵sfan5
(#10485)
2020-10-06Add minetest.get_artificial_light and minetest.get_natural_light (#5680)HybridDog
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday). Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-08-18Allow the ABM time budget to be configurable.Lars
2020-07-07Revert "Verify database connection on interval (#9665)"rubenwardy
Fixes #10113 This reverts commit 5c588f89e79e02cba392abe3d00688772321f88b.
2020-06-12Add LevelDB player database (#9982)luk3yx
2020-05-27Value copy / allocation optimizations mostly in server, SAO and serialize codesfan5
2020-05-18Add missing sao->isGone() checkssfan5
fixes #9883
2020-05-07Fix Server triggering wrong errors if environment init failssfan5
2020-04-27Add PostgreSQL authentication backend (#9756)Loïc Blot
* Add PostgreSQL authentication backend
2020-04-23Add LevelDB auth database. (#9476)luk3yx
* Add leveldb auth database.
2020-04-16Optimize get_objects_inside_radius calls (#9671)Loïc Blot
* Optimize getObjectsInsideRadius calls our previous implementation calls the ActiveObjectMgr to return ids and then lookup those ids in the same map and test each object Instead now we call the global map to return the pointers directly and we ask filtering when building the list using lamba. This drop double looping over ranges of active objects (and then filtered one) and drop x lookups on the map regarding the first call results
2020-04-15Verify database connection on interval (#9665)Loïc Blot
2020-04-11Drop content_sao.{cpp,h}Loic Blot
Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
2020-04-11scriptapi: Sort out ServerEnvironment / Environment distinction properlysfan5
The API implementation is shared between CSM and SSM. Functions should retrieve a plain env when they do not need any server-specific functions.
2020-04-10Drop genericobject.{cpp,h} (#9629)Loïc Blot
* Drop genericobject.{cpp,h} This file is not for generic object but for ActiveObject message passing. Put ownership of the various commands to the right objects and cleanup the related code. * Protect ServerActiveObject::m_messages_out * typo fix
2019-09-09Send cumulated inventory changes only each step (#8856)SmallJoker
Applies to player and detached inventories
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-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2019-07-07Improve ABM time budget handling. #8645Lars Hofhansl
2019-02-03Force player save before kicking on player shutdown (#8157)Loïc Blot
2019-01-16Fix some misspellings (#8104)Paul Ouellette
2019-01-04Make sqlite3 default auth & player backends for new worlds (#8043)Loïc Blot
* Make sqlite3 default auth & player backends for new worlds Also notify about auth backend depreciation
2019-01-04Player file directory must be only created when using file backend.Loïc Blot
Also ensure on each player save that the directory exists
2018-12-13Add an activeobject manager to hold active objects (#7939)Loïc Blot
* Add an activeobject manager to hold active objects * Add unittests
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
2018-08-05Replace auth.txt with SQLite auth database (#7279)Ben Deutsch
* Replace auth.txt with SQLite auth database
2018-07-22Add a MSVC / Windows compatible snprintf function (#7353)nOOb3167
Use sizeof where applicable for mt_snprintf