aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
AgeCommit message (Collapse)Author
2020-12-15Allow configuring block disk and net compression. Change default disk level.Lars
2020-10-04Minimap as HUD element with API controlPierre-Yves Rollo
Features: * Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes() * New HUD elements for displaying minimap with custom size and placing * New minimap mode for displaying a texture instead of the map
2020-10-01(se)SerializeString: Include max length in the nameSmallJoker
This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
2020-09-26Remove null bytes from TOCLIENT_BLOCKDATA (#10433)luk3yx
2020-09-25Correct erroneous reported max lag with prometheus (#10427)Buckaroo Banzai
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2020-09-16Clean up server-side translations, remove global variable (#10075)rubenwardy
2020-08-24Properly handle mod-errors in on_shutdownDesour
2020-08-20Load media from subfolders (#9065)DS
2020-07-28Sanitize world directory names on create. Keep original name separate (#9432)Hugues Ross
Blacklisted characters are replaced by '_' in the path. The display name is stored in world.mt, and duplicate file names are resolved by adding an incrementing suffix (_1, _2, _3, etc).
2020-06-13Server pushing media at runtime (#9961)sfan5
2020-05-27Value copy / allocation optimizations mostly in server, SAO and serialize codesfan5
2020-05-23Optimize particlespawner sending by not sending to distant playerssfan5
2020-05-23Implement spawning particles with node texture appearancesfan5
2020-05-22Cleanup of particle & particlespawner structures and code (#9893)sfan5
2020-05-20Cache liquid alternative IDs (#8053)Vitaliy
2020-05-11Add support for statbar “off state” icons (#9462)Wuzzy
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles. Add "off state" textures to the builtin statbars. Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-07Server class code cleanups (#9769)Loïc Blot
* Server::overrideDayNightRatio doesn't require to return bool There is no sense to sending null player, the caller should send a valid object * Server::init: make private & cleanup This function is always called before start() and loads some variables which can be loaded in constructor directly. Make it private and call it directly in start * Split Server inventory responsibility to a dedicated object This splits permit to found various historical issues: * duplicate lookups on player connection * sending inventory to non related player when a player connects * non friendly lookups on detached inventories ownership This reduce the detached inventory complexity and also increased the lookup performance in a quite interesting way for servers with thousands of inventories.
2020-05-05Sky API: Rename *_tint to fog_*_tint for consistencySmallJoker
2020-05-02set_fov: Add support for time-based transitions (#9705)ANAND
2020-04-29Add MetricsBackend with prometheus counter supportLoic Blot
2020-04-25Add server side translations capability (#9733)EvidenceB Kidscode
* Add server side translations capability
2020-04-17Android: fix handling non-latin characters on older Android devices (#9309)Maksim
2020-04-14Refactor texture overrides and add new features (#9600)Hugues Ross
* Refactor texture overrides, and add new features: - Texture overrides can support multiple targets in one line - Texture override files can have comment lines - Item images/wield images can be overridden * Formatting changes * Address soime feedback - Pass vectors by const reference - Log syntax errors as warnings - Remove 'C' prefix from TextureOverrideSource * Simplify override target checks with an inline helper function * make linter happy * Apply feedback suggestions Co-Authored-By: rubenwardy <rw@rubenwardy.com> * Remove remaining != 0 checks * Update copyright notice Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
2020-04-11Move serveractiveobject & unitsaoLoic Blot
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
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
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.
2020-03-08Fix 2 log messages when player joined to game (#9477)Maksim
2020-03-05set_sky improvements, set_sun, set_moon and set_starsJordach
2020-02-11Script API: Check that SAOs are still usable before attempting to use themsfan5
2020-02-01Improve core.sound_play with ephemeral sounds and player exclusionsfan5
2019-12-20Fix the player information version_string return value (#8616)Lejo
* Give more player information * Correct lua_api.txt * Correct keys in lua_api.txt * Improve Code * Only Bugfix+ser_vers * Correct doc * Fix double
2019-12-06Add z-index management to HUDPierre-Yves Rollo
2019-11-19Rework packet receiving in ServerThreadsfan5
Notably it tries to receive all queued packets between server steps, not just one.
2019-10-02Attachments: Fix attachments to temporary removed objects (#8989)SmallJoker
Does not clear the parent's attachment information when the child is deleted locally. Either it was removed permanently, or just temporary - we don't know, but it's up to the server to send a *detach from child" packet for the parent.
2019-09-24Fix some reference counters (memleak) (#8981)SmallJoker
Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
2019-09-19Add support for per-player FOV overrides and multipliersAnand S
2019-09-17Inventory: Undo prediction on dropSmallJoker
2019-09-14Send ActiveObjects once right after Init2ANAND
2019-09-14Formspecs: Introduce formspec_version to modsSmallJoker
2019-09-09Send cumulated inventory changes only each step (#8856)SmallJoker
Applies to player and detached inventories
2019-08-24Inventory: Send dirty lists where appropriate (#8742)SmallJoker
This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code.
2019-08-20remove_detached_inventory: Fix segfault during mod loadSmallJoker
2019-08-13Fix unnecessary exception use in 3 more methods (#8791)Jozef Behran
* Fix unnecessary exception use in Server::SendBlocks The code in this method calls getBlockNoCreate and then messes around with try...catch to skip blocks which are not in the memory. Additionally, it repeatedly calls m_env.getMap() inside this loop. Speed the code up by extracting the m_env.getMap() out of the loop and getting rid of the try...catch. * Fix unnecessary exception use in Server::SendBlock Another unnecessary try...catch is slowing down Server::SendBlock. Remove that to speed it up and get a nice side effect of simplifying the code in question. * Fix unnecessary exception use in MMVManip::initialEmerge Remove another unneeded exception usage from MMVManip::initialEmerge to speed that code up and simplify it but be careful to not remove the braces as there is a TimeTaker in use there.
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-08-10Implement adding velocity to player from Luasfan5
The intended usecase is knockback, but there's potential for more.
2019-08-08Allow customizing chat message format (#8529)ANAND
2019-08-07Avoid crash caused by, and improve, 'findSpawnPos()' (#8728)Paramat
Avoid an unsuitable spawn position (which if outside mapgen limits can cause a crash) if the main 0-3999 loop reaches its end. Fallback to a spawn at 0,0,0. Check the mapgen-returned 'spawn_level' value for being outside limits. When 'air_count' reaches 2, move back down 1 to spawn in the lower empty node. If the spawn position is disallowed by 'objectpos_over_limit()', 'break' from loop instead of 'continue' because positions above are probably also over limit. Reset 'air_count' to 0 if an obstruction is found, to make 'air_count' consecutive empty nodes. Allow spawn in 'airlike' drawtype nodes such as mod-added vacuum, alien atmospheres, fog etc. Add clarifying comments and improve codestyle.
2019-08-01Group "immortal" also protects players from damageWuzzy
Document new meaning of immortal=1 for players Disable breathing if player is immortal Hide builtin statbars if player immortal (delayed) Co-authored-by: ClobberXD <ClobberXD@gmail.com>