summaryrefslogtreecommitdiff
path: root/src/server.cpp
Commit message (Collapse)AuthorAge
* Settings: Proper priority hierarchySmallJoker2021-01-29
| | | | | | | | | | | 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
* Allow configuring block disk and net compression. Change default disk level.Lars2020-12-15
|
* Minimap as HUD element with API controlPierre-Yves Rollo2020-10-04
| | | | | | | 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
* (se)SerializeString: Include max length in the nameSmallJoker2020-10-01
| | | | | | | 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
* Remove null bytes from TOCLIENT_BLOCKDATA (#10433)luk3yx2020-09-26
|
* Correct erroneous reported max lag with prometheus (#10427)Buckaroo Banzai2020-09-25
| | | Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
* Clean up server-side translations, remove global variable (#10075)rubenwardy2020-09-16
|
* Properly handle mod-errors in on_shutdownDesour2020-08-24
|
* Load media from subfolders (#9065)DS2020-08-20
|
* Sanitize world directory names on create. Keep original name separate (#9432)Hugues Ross2020-07-28
| | | 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).
* Server pushing media at runtime (#9961)sfan52020-06-13
|
* Value copy / allocation optimizations mostly in server, SAO and serialize codesfan52020-05-27
|
* Optimize particlespawner sending by not sending to distant playerssfan52020-05-23
|
* Implement spawning particles with node texture appearancesfan52020-05-23
|
* Cleanup of particle & particlespawner structures and code (#9893)sfan52020-05-22
|
* Cache liquid alternative IDs (#8053)Vitaliy2020-05-20
|
* Add support for statbar “off state” icons (#9462)Wuzzy2020-05-11
| | | | | | | 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>
* Server class code cleanups (#9769)Loïc Blot2020-05-07
| | | | | | | | | | | | | | | | | | | * 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.
* Sky API: Rename *_tint to fog_*_tint for consistencySmallJoker2020-05-05
|
* set_fov: Add support for time-based transitions (#9705)ANAND2020-05-02
|
* Add MetricsBackend with prometheus counter supportLoic Blot2020-04-29
|
* Add server side translations capability (#9733)EvidenceB Kidscode2020-04-25
| | | | * Add server side translations capability
* Android: fix handling non-latin characters on older Android devices (#9309)Maksim2020-04-17
|
* Refactor texture overrides and add new features (#9600)Hugues Ross2020-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Move PlayerSAO to dedicated filesLoic Blot2020-04-11
|
* Move serveractiveobject & unitsaoLoic Blot2020-04-11
| | | | | Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
* Drop genericobject.{cpp,h} (#9629)Loïc Blot2020-04-10
| | | | | | | | | | * 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
* 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.
* Fix 2 log messages when player joined to game (#9477)Maksim2020-03-08
|
* set_sky improvements, set_sun, set_moon and set_starsJordach2020-03-05
|
* Script API: Check that SAOs are still usable before attempting to use themsfan52020-02-11
|
* Improve core.sound_play with ephemeral sounds and player exclusionsfan52020-02-01
|
* Fix the player information version_string return value (#8616)Lejo2019-12-20
| | | | | | | | | | | | | | | | * Give more player information * Correct lua_api.txt * Correct keys in lua_api.txt * Improve Code * Only Bugfix+ser_vers * Correct doc * Fix double
* Add z-index management to HUDPierre-Yves Rollo2019-12-06
|
* Rework packet receiving in ServerThreadsfan52019-11-19
| | | | | Notably it tries to receive all queued packets between server steps, not just one.
* Attachments: Fix attachments to temporary removed objects (#8989)SmallJoker2019-10-02
| | | | 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.
* Fix some reference counters (memleak) (#8981)SmallJoker2019-09-24
| | | | | Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
* Add support for per-player FOV overrides and multipliersAnand S2019-09-19
|
* Inventory: Undo prediction on dropSmallJoker2019-09-17
|
* Send ActiveObjects once right after Init2ANAND2019-09-14
|
* Formspecs: Introduce formspec_version to modsSmallJoker2019-09-14
|
* Send cumulated inventory changes only each step (#8856)SmallJoker2019-09-09
| | | | Applies to player and detached inventories
* Inventory: Send dirty lists where appropriate (#8742)SmallJoker2019-08-24
| | | | | 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.
* remove_detached_inventory: Fix segfault during mod loadSmallJoker2019-08-20
|
* Fix unnecessary exception use in 3 more methods (#8791)Jozef Behran2019-08-13
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 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)
* Merge pull request #8776 from osjc/FixGetNodeJozef Behran2019-08-10
| | | Finish getNode cleanup
* Implement adding velocity to player from Luasfan52019-08-10
| | | | The intended usecase is knockback, but there's potential for more.
* Allow customizing chat message format (#8529)ANAND2019-08-08
|
* Avoid crash caused by, and improve, 'findSpawnPos()' (#8728)Paramat2019-08-07
| | | | | | | | | | | | | | | | 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.