Skip to content

Instantly share code, notes, and snippets.

@sofar
Created April 5, 2017 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sofar/d644bafe5ab6c7ba3c8674eb80b5bbd6 to your computer and use it in GitHub Desktop.
Save sofar/d644bafe5ab6c7ba3c8674eb80b5bbd6 to your computer and use it in GitHub Desktop.
  • 231ac33d Bump version to 0.4.15 (sfan5)

  • 5114329a Final update to credits before release (Craig Robbins)

  • a17bcb17 Translated using Weblate (Russian) (Nikolay) Currently translated at 59.2% (544 of 918 strings)

  • 3fa7c5a4 Translated using Weblate (Portuguese (Brazil)) (Cold Meson 06) Currently translated at 99.5% (914 of 918 strings)

  • ceba12e5 Translated using Weblate (Portuguese (Brazil)) (Bruno Borges) Currently translated at 94.8% (871 of 918 strings)

  • 34e69e54 Translated using Weblate (Portuguese (Brazil)) (Cold Meson 06) Currently translated at 84.5% (776 of 918 strings)

  • ab1d98bc Translated using Weblate (Dutch) (Rogier) Currently translated at 85.2% (783 of 918 strings)

  • 2acd3ad6 Translated using Weblate (German) (Wuzzy) Currently translated at 100.0% (918 of 918 strings)

  • 70579dc7 Android: Workarounds for Googles completely broken NDK (sfan5)

  • 1dd361f3 Android: update curl and libgmp (est31)

  • 5e4d6468 Builtin/../falling.lua: Avoid crash when object pos over limit (paramat) If the object pos is over limit, 'add entity' will not add an entity, causing 'obj' to be nil.

  • ba52a34f Don't ship with broken languages (#4940) (est31)

  • 09f1a0c1 Disable mod security by default (closes #4944) (sfan5)

  • cc7c31a5 Fix warning reported by clang (possible bug in Settings lua api) (sfan5)

  • 04f68a87 Correct Swahili translations (#4939) (sfan5)

  • bdf8f854 Limit drawing rect of selected item to viewport size (fixes #4341) (sfan5)

  • 0f050210 Security: Fix resolving of some relative paths (ShadowNinja) Trying to resolve a path with RemoveRelativePathComponents that can't be resolved without leaving leading parent components (e.g. "../worlds/foo" or "bar/../../worlds/foo") will fail. To work around this, we leave the relative components and simply remove the trailing components one at a time, and bail out when we find a parent component. This will still fail for paths like "worlds/foo/noexist/../auth.txt" (the path before the last parent component must not exist), but this is fine since you won't be able to open a file with a path like that anyways (the O.S. will determine that the path doesn't exist. Try cat /a/../etc/passwd).

  • f522e735 Fix RemoveRelatvePathComponents (ShadowNinja) This used to return "/foo" for "../foo" when it should return the enpty string (i.e., error removing all relative components).

  • 59f84ca0 Mod security: Allow read-only access to all mod paths (ShadowNinja)

  • 24edfb77 Fix occlusion culling, again (#4930) (lhofhansl)

  • e4f7ce19 Fix occlusing counting (#4922) (lhofhansl)

  • 6d4e7f22 Fix unnecessary block loading (#4847) (Dániel Juhász) This commit makes the game load blocks only if they are not in the memory.

  • 78bf7c46 Mapgen: Make mgv7 the default in UI (Auke Kok) The actual menu default comes from defaultsettings.cpp.

  • 0614da3a Fix build with gettext enabled (est31)

  • f8408398 Cavegen: Wider tunnels in mgflat, mgfractal, mgvalleys (paramat) As mgv7 is now the default mapgen i re-checked its tunnel width on request, discovered they needed to be wider, and have made this change. This commit widens the identical 3D noise tunnels in the other mapgens in exactly the same way.

  • c67f2b29 Run updatepo.sh (est31)

  • 211d919b Update minetest.conf.example and settings_translation_file.cpp (est31)

  • 64615915 Translated using Weblate (Ukrainian) (Fixer) Currently translated at 38.1% (350 of 918 strings)

  • 55cb5a19 Translated using Weblate (German) (Wuzzy) Currently translated at 98.9% (908 of 918 strings)

  • 1c4bc0d4 Translated using Weblate (German) (Jan Sbrz) Currently translated at 94.7% (870 of 918 strings)

  • b898ab64 Translated using Weblate (Lithuanian) (Zygi Mantus) Currently translated at 26.2% (241 of 918 strings)

  • eac6323e Translated using Weblate (Russian) (Andrey) Currently translated at 56.3% (517 of 918 strings)

  • 571ed96c Translated using Weblate (Russian) (Maksim Gamarnik) Currently translated at 56.2% (516 of 918 strings)

  • 3a0ded27 Translated using Weblate (Russian) (Stas Kies) Currently translated at 56.1% (515 of 918 strings)

  • bb9fe6eb Translated using Weblate (Indonesian) (Alvin Hikmawan) Currently translated at 69.4% (638 of 918 strings)

  • 72890928 Translated using Weblate (Indonesian) (Muhammad Rifqi Priyo Susanto) Currently translated at 58.6% (538 of 918 strings)

This is a merger of 2 commits.

  • 47b1a118 Translated using Weblate (Indonesian) (Alvin Hikmawan) Currently translated at 58.6% (538 of 918 strings)

  • 51210d31 Translated using Weblate (Indonesian) (Yana Agun Siswanto) Currently translated at 58.6% (538 of 918 strings)

  • f18cebdd Translated using Weblate (French) (Onyx Steinheim) Currently translated at 100.0% (918 of 918 strings)

  • 68d24fb7 Translated using Weblate (French) (AcidNinja) Currently translated at 100.0% (918 of 918 strings)

This is a merger of 4 commits.

  • 3aabb658 Translated using Weblate (French) (Onyx Steinheim) Currently translated at 97.7% (897 of 918 strings)

  • 735581ba Translated using Weblate (Polish) (Jakub Mendel) Currently translated at 59.5% (547 of 918 strings)

This is a merger of 2 commits.

  • e36ae4ec Translated using Weblate (Polish) (red-001) Currently translated at 41.6% (382 of 918 strings)

  • 66fe077d Translated using Weblate (Polish) (nedzadarek) Currently translated at 41.2% (379 of 918 strings)

  • eb1d7cdb Translated using Weblate (Korean) (Han So Ri) Currently translated at 53.8% (494 of 918 strings)

This is a merger of 2 commits.

  • faea229d Translated using Weblate (Korean) (Dongjin Han) Currently translated at 5.6% (52 of 918 strings)

  • 87858279 Translated using Weblate (Korean) (sorichan) Currently translated at 5.6% (52 of 918 strings)

  • 46ac92b1 Translated using Weblate (Korean) (Dongjin Han) Currently translated at 1.5% (14 of 918 strings)

  • 428cebc2 Translated using Weblate (Korean) (sorichan) Currently translated at 1.5% (14 of 918 strings)

  • a5ec1ddc Translated using Weblate (Norwegian Bokmål) (Petter Reinholdtsen) Currently translated at 3.3% (31 of 918 strings)

  • 18a7d3e7 Translated using Weblate (Norwegian Bokmål) (Christian Haug) Currently translated at 2.8% (26 of 918 strings)

  • 64969ef4 Translated using Weblate (Norwegian Bokmål) (Petter Reinholdtsen) Currently translated at 2.7% (25 of 918 strings)

  • 9f476fd6 Translated using Weblate (Norwegian Bokmål) (Christian Haug) Currently translated at 1.7% (16 of 918 strings)

  • f8456dde Translated using Weblate (Norwegian Bokmål) (Petter Reinholdtsen) Currently translated at 1.6% (15 of 918 strings)

  • 289cf93d Translated using Weblate (Norwegian Bokmål) (Christian Haug) Currently translated at 1.5% (14 of 918 strings)

  • ef4eb46b Translated using Weblate (Norwegian Bokmål) (Petter Reinholdtsen) Currently translated at 1.4% (13 of 918 strings)

  • a2c44672 Translated using Weblate (Czech) (Jakub Vaněk) Currently translated at 51.0% (469 of 918 strings)

  • ef68a506 Translated using Weblate (Czech) (Tomáš Bělohlávek) Currently translated at 58.0% (533 of 918 strings)

This is a merger of 2 commits.

  • 715fba6f Translated using Weblate (Chinese (Taiwan)) (Jeff Huang) Currently translated at 100.0% (918 of 918 strings)

  • 593eaf3b Translated using Weblate (Chinese (Taiwan)) (Mingye Wang) Currently translated at 97.0% (891 of 918 strings)

  • 5f41ae2a Translated using Weblate (Catalan) (tonibm19) Currently translated at 46.0% (423 of 918 strings)

  • ab8fbd97 Translated using Weblate (Catalan) (Roc Humet) Currently translated at 43.6% (401 of 918 strings)

  • f8c87a44 Translated using Weblate (Spanish) (Alfonso R. Zepeda R) Currently translated at 57.8% (531 of 918 strings)

  • ec7e23d7 Translated using Weblate (Japanese) (Rui) Currently translated at 49.4% (454 of 918 strings)

This is a merger of 2 commits.

  • 6752dda8 Translated using Weblate (Swahili) (Eidy) Currently translated at 99.8% (917 of 918 strings)

This is a merger of 3 commits.

  • 7af9442e Added translation using Weblate (Swahili) (Eidy)

  • 22ad774f Translated using Weblate (Portuguese) (João Rodrigues) Currently translated at 66.7% (613 of 918 strings)

There is no need to specify that a mod is an extra.

  • 1e6130d1 Translated using Weblate (Portuguese (Brazil)) (José Henrique Luckmann) Currently translated at 84.2% (773 of 918 strings)

  • 7958bda9 Translated using Weblate (Danish) (Thomas Wagner Nielsen) Currently translated at 73.0% (671 of 918 strings)

  • 1c8d43ca Translated using Weblate (Danish) (Joe Hansen) Currently translated at 73.0% (671 of 918 strings)

This is a merger of 3 commits.

  • 05f6b274 Translated using Weblate (Danish) (Thomas Wagner Nielsen) Currently translated at 29.5% (271 of 918 strings)

  • 0d94bfab Mgv7: Change default cave width to 0.09 (sfan5)

  • 54007100 Fix segfault on startup error on Android (rubenwardy)

  • 0fdf24d6 Fix camera jumping on Android when panning past 0/360 mark (rubenwardy)

  • d9675d3d Mod dependency lists: Should have platform-independent line breaking (Bernardo Sulzbach) This fixes a bug existing in modmgr.lua as reported by @Wuzzy2 which caused the mod dependency list to glitch if input was using a line terminator different than the OS default.

The C++ code does not need any changes as it already trims CR occurrences on platforms on which the line termination sequence is LF.

Taken into account the size of the depends.txt files used, this should not introduce a noticeable performance regression.

Fixes #4720

  • c98ae2a9 Setting limits: Fix message text in advanced settings tab (Rogier) It would complain that the value should be higher than the lower bound, when it should be higher than or equal to the lower bound.

Similar issue for the upper bound.

  • 02112f84 View range: Set maximum to 4000 nodes (Rogier) The network protocol does not support larger than 255 mapblocks.

  • 38abc918 Mapgen: Make mgv7 the default mapgen (paramat)

  • 60772071 Fix computation of viewing range (in blocks) sent to server (#4882) (Rogier-5) Fixes #4878

Also remove an artificial viewing range reduction that (presumably) was added to compensate for miscomputed viewing ranges, and that doesn't seem to be needed any more (thanks to lhofhansl).

  • 2886f0cc Fix sqlite databases being read-only on 64bit Android by patching sqlite (#4871) (rubenwardy) Fixes #4121

  • 3f88d776 Buildbot: Update LuaJIT version (sfan5)

  • 5a2431a9 Simple decorations: Fix range check for deco->deco_param2 (Auke Kok) Allow any int value, and properly range check it before casting.

  • 24719c69 Android: fix build and update deps (est31)

  • bbe8386a Update credits (#4827) (Zeno-) Update credits

  • 2e697116 Simple deco: Allow setting param2 value on placement (Auke Kok) Schematics can already be placed with a param2 value, but not simple 1-node plant decorations of the simple type.

This adds a param2 field to the simple deco type that is checked to be between 0 and 255, and put to the placed node at mapgen.

This can be used to put a degrotate value in, or e.g. a fill value for leveltype nodes, or a place_param2 value at mapgen placement, or vary the shape of meshoptions plantlike drawtype.

  • 075833e3 Fog: Make fraction of visible distance at which fog starts configurable (Lars Hofhansl) Optimise the fetching of global settings 'camera_smoothing', 'cinematic' and 'cinematic_camera_smoothing'. Cache 'cam_smoothing'.

  • 9714cdcf Liquids: Update flow on block load (MillersMan) When loading a block add liquid-nodes that might flow away or spread to neighbours to the transforming_liquid queue.

  • cc36f5e9 Liquids: Preserve flow state if 'ignore' is a neighbour (MillersMan) Prevent waterfalls from falling down or streams from flowing away when the source node is in an unloaded block - Nodes near a CONTENT_IGNORE node will be interpreted as if the ignored node is a liquid node that just supports the current state of the nodes in question.

  • 2829742a Map::isValidPosition: Return false instead of throwing exception (MillersMan)

  • 8a7dc838 Optimize block sent: Fix rendering issue (Lars Hofhansl)

  • e2cbfa82 Biomes: Increase heat and humidity noise spread to 1000 (paramat) To avoid smaller biomes when extra biomes are added to MTGame. The addition of bushes in MTGame grasslands makes wood resources easier to find and less distant, so slightly larger biomes are now acceptable, but also desirable to encourage travel and create more sense of adventure.

  • fb1406bd Don't send a join message in singleplayer mode. (red-001)

  • 8b63fbef Fix incorrect docs about minetest.hud_replace_builtin (#4833) (Amaz) Fixes minetest/minetest#4832

  • 144da5f5 Very small documentation fix. (#4830) (Bluebird)

  • 105676b9 Lua_api.txt: Clarify use of looping sounds (paramat)

  • 6c9f10e1 Mgv7 floatlands: Various improvements (paramat) Floatland base terrain underside was too thin, causing excessive water leakage through tunnels under lakes, now make it thicker. Floatland mountain terrain had a rim 1 node thick which made it bare stone, now make it 2 nodes thick to merge with the floatland base terrain rim and to have a layer of biome material. Make mountain terrain more exponentially shaped by altering the exponent. Remove unnecessary and potentially ugly MYMAX() applied to n_base_height.

  • 5dc61988 Optimize/adjust blocks/ActiveObjects sent at the server based on client settings. (#4811) (lhofhansl) Optimize/adjust blocks and active blocks sent at the server based on client settings.

  • c3898582 Allow restricting detached inventories to one player (sfan5) This combats the problem of sending the hundreds of "creative" / "armor" or whatever detached invs that exist on popular servers to each and every player on join or on change of said invs.

  • 2fe3bf5a Limit light_source in the engine (#4814) (juhdanad) Since light_source>15 causes crash, it must be limited.

  • bb06d377 Fix filepath > RemoveRelativePathComponent unittest (sfan5) (was broken by e4ee6548afd01040046ee3780d0fbb121d141251)

  • 785a9a6c Wieldhand: Allow overriding the hand (TeTpaAka)

  • e4ee6548 Fix fs::RemoveRelativePathComponents for paths with a leading dot component (ShadowNinja) Previously, paths like ./worlds would be resolved to /worlds since the leading dot was considered just as irrelevant as a dot in the middle of the path.

  • 3af5eef9 Fix secure io.lines (ShadowNinja) It used to drop all of the return values from the insecure version of the function.

  • 9e10f9f4 Fix secure io.open without mode (ShadowNinja)

  • 0d1c9598 Make supplying empty formspec strings close the formspec (#4737) (orwell96) This will only happen if the formname matches or if formname is "".

  • dbeb322f No functional changes. Credit gcu (Zeno-) This merge doesn't make any functional changes. It's a trivial style fix so that @gregorycu can be dual credited along with shadowninja for PR #4800

  • 4bf4154c Fix superflous shader setting updates (#4800) (ShadowNinja) This improves rendering performance by ~40%

  • c6ca7a81 Tool break: Reduce gain of break sounds (paramat)

  • 681d127f Particles: Make attached particle spawners respect the parent's yaw (orwell96) Position, velocity and acceleration vectors of particles are rotated by the yaw of the parent object so that they are truly relative to it. Clarify new attached particle spawner behavior in lua_api.txt.

  • 4a0a6723 Builtin/../item: Enable tool breaking sounds (Auke Kok) If a tool wears out and is destroyed, it's itemstack count goes to 0, and we can optionally play a breaking sound.

This patch implements playing a breaking sound when this occurs. Sounds need to be added to the tool itemdef registration as the sound name string in the .sound.breaks member.

  • afc48c80 Introduce builtin_shared and use it to fix #4778 (est31) Fixes #4778 which was about the error:

ServerError: Lua: Runtime error from mod '' in callback item_OnPlace(): /usr/local/share/minetest/builtin/game/item.lua:278: attempt to call global 'check_attached_node' (a nil value)

The issue was a regression of commit 649448a2a91fbf3e944b2f2e739f4e2292af1df0

"Rename nodeupdate and nodeupdate_single and make them part of the official API"

  • 5f0dc8e7 Fix unexplained shader issue (glsl compiler bug??) (#4757) (Rogier-5)

  • 8e61c1df Lua_api.txt: Naming convention for custom item/entity fields (Wuzzy) Custom (non-engine) field names of items and entities are allowed. This is now documented in lua_api.txt. Field names beginning with an underscore are now reserved for mod use, the engine must not introduce any fields beginning with an underscore.

  • bc3980e1 Mgv7: Add optional floatlands, disabled by default (paramat)

  • 5fd1ef9b Revert "Adding particle blend, glow and animation (#4705)" (sfan5) This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.

  • 93e3555e Adding particle blend, glow and animation (#4705) (Foghrye4)

  • 649448a2 Rename nodeupdate and nodeupdate_single and make them part of the official API (est31) Now, the renamed forms of nodeupdate and nodeupdate_single are part of the official API.

As nodeupdate has been used by Minetest Game and in mods despite of not being part of the official API, we ease the transition by still supporting it for the 0.4.15 release. After the release, the two functions can be removed.

The removal will not violate the stability promise, as that promise only includes the official and documented API.

Also, make some formerly global functions local. They most likely haven't been used by mods, therefore they won't get stubs with deprecation warnings, hard erroring directly.

  • 6707d622 Install texture_packs.txt to DOCDIR (Yutao Yuan)

  • 1980d9ea Fix crash when attached object no longer exists (Rogier) Active objects that are attached to other objects are not safe from deletion. As a result, the parent object may have a reference to an id of a child's that no longer exists.

If at some point an attempt is made to manipulate the child, enviromment->getActiveObject(child-id) returns NULL. Using the NULL pointer causes the crash...

  • e4031156 Add control information to player interacts (#4685) (raymoo)

  • 67ec2fa9 Nodeupdate: Remove documentation in lua_api.txt (paramat) In preparation for nodeupdate being renamed and made official API in future.

  • 68f5b877 Halo: Highlight selected face (RealBadAngel) This is a slightly modified and cleaned up version of #3774 by RealBadAngel. By sofar: Remove color change (just make it lighter) and some minor cleanups.

  • 8a1a9fdc Fixed tooltips not resizing with \n (#4766) (lisacvuk)

  • Fixed tooltips not resizing with \n

  • Fixed it for 1.8.4 too.

  • Fixed not working with Freetype disabled.

  • Modified it to use Zeno-'s solution.

  • b98f98b3 Fix incorrect distance computation for visible blocks (#4765) (Rogier-5) The client would not compute the distance from the camera to to a mapblock correctly. The result was that blocks that were in view (i.e. not beyond the fog limit) would not be rendered.

With the improved distance computation, a range adjustment that existed in clientiface.cpp is no longer required.

  • 7e17eaed Fix mob deserialization errors in the client (#4743) (Rogier-5) The problem was seen while using the mobf mod package.

The problem happens when the server serializes entity attachments. Sometimes, such attachments no longer exist. The serialization code skips those. However, the total number of attachments was serialized earlier. Therefore the client expects more than it gets, and logs a serialization error.

  • c05aac37 Occlusion culling: Add comments, minor code improvements (paramat) Remove unnecessary code. Use '/ 2.0f' because endoff is a float.

  • c7937002 Conf.example: Document block_send_optimize_distance (Lars Hofhansl) Add missing documentation.

  • 739ef175 Sky: Draw bottom of the sky box in 'cloudy fog color' (Lars Hofhansl) To be identical to the lower half of the skybox sides. Now needed as the skybox base is often seen due to increasingly vertical mapgens.

  • e7c62ede Retrieve mapblocks from the server in a sphere, not a cube (Lars Hofhansl) Use unused range argument in 'isBlockInSight()' to limit mapblock sends to a sphere of radius 'max block send distance'.

  • 2b21cac1 Occlusion culling: Fix 'end offset' distance, half this for centre point (Lars Hofhansl) 'endoff', the maximum diagonal of a mapblock, was incorrectly calculated. Half this value for the centre point of the mapblock.

  • 45eab340 Don't use reduced vertical limits for mapblock send and generation (Lars Hofhansl)

  • 3c5da70d Builtin/../falling: Fix bugs caused by 'ignore' nodes (paramat) Original commit by t4im, rebased and developed by paramat. Fix CONTENT_IGNORE being replaced by falling nodes or causing large areas of sand to collapse into itself. Format some conditional code for clarity. Add and clarify some comments.

  • e82bd3f0 Privileges: Only give singleplayer 4 basic privs (Wuzzy)

  • interact
  • shout
  • privs
  • basic_privs
  • 29523266 Windows: Add manifest file and set "High DPI Aware" true (adrido) This resolves washy font and incorrect mouse handling on Windows if a screen with high DPI is used.

  • ad4bf2cc MSVC: Generate debug information for release builds (#4674) (SmallJoker) Replace parameters with the equivalent /Ox

  • 1c570cb3 Separate optional from required mod dependencies in main menu (#4721) (Wuzzy)

  • Separate optional from require dep's in main menu

  • Simplify modmgr mod dependency listing code

  • 66bb2954 PlayerSAO saving fix (#4734) (Ner'zhul) PlayerSAO::disconnected() function was historical and remove the link between SAO and RemotePlayer session. With previous attributes linked to RemotePlayer saving was working. But now attributes are read from SAO not RemotePlayer and the current serialize function verify SAO exists to save the player attributes.

Because PlayerSAO::disconnected marks playersao for removal, only mark playerSAO for removal and let PlayerSAO::removingFromEnvironment do the correct saving behaviour and all the disconnection process instead of doing a partial removal and let the server loop doing the RemotePlayer cleanup and remove some saved attributes...

  • b5c84c34 Fix memory leak in ::safeLoadFile (#4730) (Zeno-)

  • 6bb43472 Remove unused shader matrices. (#4723) (lhofhansl)

  • dde66a82 Cycle directly to nothing shown instead of showing the profiler graph again (lhofhansl) Fix for previous commit.

  • f8fd432d Add debug priv, and allow player to display the scene as wire-frame. (#4709) (lhofhansl)

  • bf315c05 Add minetest.get_server_uptime() function to Lua API (#4702) (Brandon) Add minetest.get_server_uptime() function to Lua API

  • 7607b0ac Add version API (ShadowNinja)

  • 70e2df4f Lua voxelmanip: Add optional buffer param for 'get param2 data' (paramat) Update lua_api.txt.

  • 380a4b6d Core.rotate_and_place: Remove unused call to get_look_pitch() (Auke Kok)

  • e1842ed3 Optionally disable optimization that causes underwater and cave rendering glitches. (#4686) (lhofhansl)

  • 595932a8 Fix overloading problems mentioned by clang (Loic Blot)

  • 9d25242c PlayerSAO/LocalPlayer refactor: (#4612) (Ner'zhul)

  • Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO

  • Move breath to PlayerSAO & LocalPlayer

  • Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO

  • Migrate m_yaw from Player to LocalPlayer for client

  • Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it

  • Move pitch to LocalPlayer & PlayerSAO

  • Move m_position from Player to LocalPlayer

  • Move camera_barely_in_ceiling to LocalPlayer as it's used only there

  • use PlayerSAO::m_base_position for Server side positions

  • remove a unused variable

  • ServerActiveObject::setPos now uses const ref

  • use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded

  • Move hp from Player to LocalPlayer

  • Move m_hp from LuaEntitySAO to UnitSAO

  • Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer

  • d4332602 Rename testsounds/ directory to sounds/ (#1984) (Hugo Locurcio)

  • 6d7b95d7 Add missing keyname_to_keycode function (needed on Android) (sfan5) When rewriting keycode.cpp I overlooked this function, fixes #4683 completely

  • 7252c803 Add missing remoteplayer.cpp to Android build (Ner'zhul) this should fix #4683

  • 361e687f Add unittests to test player saving/loading (#4679) (Ner'zhul)

  • bcb06aeb Cleanup (Dániel Juhász)

  • be39f613 Use node lighting for liquid spreading (Dániel Juhász) This commit modifies the liquid transforming procedure to light and unlight nodes instead of whole map blocks.

  • c071efaa Improved lighting (Dániel Juhász) This commit rewrites the procedure that is responsible for light updating.

this commit -provides iterative solutions for unlighting and light spreading -introduces a new priority queue-like container for the iteration -creates per-node MapBlock caching to reduce retrieving MapBlocks from the map -calculates with map block positions and in-block relative node coordinates -skips light updating if it is not necessary since the node's new light will be the same as its old light was

  • 1fd9a074 Document item use callbacks (#4668) (raymoo)

  • 198ed60c Shaders: Remove special handling for liquids. (#4670) (lhofhansl)

  • 6eb6e75f Adding LuaError on attempt to assign vectors with values out of range (Foghrye4)

  • 3db2f08f ParticleSpawner: fix offset being added twice (Gael-de-Sailly)

  • a1e1323d Windows: dont link to libraries that are already linked by cmake (adrido) This solves the problem whith building where build fails if the libaries have different names.

  • 98176481 Shaders: Apply tone mapping before fog calculation. (Lars Hofhansl)

  • 779d2c5f Shaders: Harmonize Irrlicht and shader fog calculations (Lars Hofhansl)

  • 74eb7f50 Lua_api.txt: Clarify 'override_meta' bool in 'set mapgen setting' (paramat)

  • 0c763031 Damage flash: Reduce maximum alpha. Avoid fade overload (paramat) Flash alpha maximum is reduced from 180 to 127 to avoid player blindness in combat. Flash alpha minimum is unchanged. The 'damage_flash' value is now limited to max alpha, to avoid multiple hits creating a huge value that causes flash to stay at maximum alpha for a long period. Now alpha always starts to fade immediately after taking damage. Both problems can be seen in Minetest let's play videos. Simplify and optimise some code.

  • 63a3bb22 Changes to static object storage limit and error message (paramat) Move static object storage force-delete message from errorstream to warningstream. Increase 'max objects per block' setting to 64. Add missing spaces in warning code.

  • c7d569b8 Chat commands: Trim whitespaces from input of /privs command (red-001)

  • 91250c10 Fix crash on attaching player to entity (Foghrye4) Rename "refresh" to "processInitData"

  • 0d740c5d Builtin: Add vector.floor helper function (rubenwardy)

  • a291cd61 Revert changes to toggleNoClip and toggleFreeMove (Lars Hofhansl)

  • 3253b6bd Don't use day light sky unless noclip and free_move are enabled (Lars Hofhansl)

  • 2ff054d0 Enable mod security by default (ShadowNinja)

  • c31e3543 Builtin/../chatcommands: Add /grantme command (red-001)

  • 4b17105d Emergeblocks: Fix occasional crash (Rogier) Modification of the emergeblocks internal state was not protected by a lock, causing a race condition. This can be reproduced by repeatedly running emergeblocks for an already-generated section of the map (with multiple emerge threads).

  • adad6e0a Travis: Only trigger a compile, when C/C++ related files were touched (#4284) (Tim)

  • 9a3129da Make documentation about ItemStack:set_{name,count,wear} clearer (sfan5) These methods do not actually fail but instead clear the item stack and return false if a value like e.g. "" is passed.

  • a468acce Builtin/../falling.lua: Code optimisation (tenplus1)

  • 0ad40fd4 Use range-based fog instead of z-plane based. (Lars Hofhansl)

  • c9e7a27e Attached particle spawners (raymoo)

  • 0b27a70b Don't use unordered maps for ProfilerGraph (fixes flickering) (sfan5)

  • 4f684b58 Add a button for disabling all mods to world config. (#3900) (red-001)

  • b6569f1c Add missing languages to the settings (SmallJoker)

  • a4a9ee94 Disable cmake message concerning WIN32 on non-windows systems (Rogier)

  • 1b450861 A little cleanup since previous commit (Loic Blot)

  • 70f104be Environment cleanup (Loic Blot)

  • Move client list to ServerEnvironment and use RemotePlayer members instead of Player

  • ClientEnvironment only use setLocalPlayer to specify the current player

  • Remove ClientEnvironment dead code on player list (in fact other players are CAO not Player objects)

  • Drop LocalPlayer::getPlayer(xxx) functions which aren't used.

  • Improve a little bit performance by using const ref list for ClientEnvironment::getPlayerNames() & Client::getConnectedPlayerNames()

  • Drop isLocal() function from (Local)Player which is not needed anymore because of previous changes

This change permits to cleanup shared client list which is very old code. ClientEnvironment doesn't use player list anymore, it only contains the local player, as addPlayer is only called from Client constructor client side. Clients are only CAO on client side, this cleanup permit to remove confusion about player list.

  • b3fc1334 Remove unused parameter of GUIVolumeChange (Rui)

  • 569b89b3 Move RemotePlayer code to its own cpp/header (Loic Blot)

  • 7bbd7164 RemotePlayer/LocalPlayer Player base class proper separation (code cleanup) (patch 3 of X) (Loic Blot)

  • remove IGameDef from Player class, only LocalPlayer has it now

  • move many attributes/functions only used by LocalPlayer from Player to LocalPlayer

  • move many attributes/functions only used by RemotePlayer from Player to RemotePlayer

  • make some functions const

  • hudGetHotbarSelectedImage now returns const ref

  • RemotePlayer getHotbarSelectedImage now returns const ref

  • various code style fixes

  • edba6e50 Optimize ClientIface::getPlayerNames(): return const ref instead a copy of all names (Loic Blot)

  • fd5a130b More code cleanup (UNORDERED + RemotePlayer/LocalPlayer) (Loic Blot)

  • ClientEnvironment now uses UNORDERED MAP for active objects

  • Use RemotePlayer and LocalPlayer everywhere it's possible

  • Minor code style fixes

  • Drop Client::getBreath() unused function

  • 067766ee Fix backwards compatibility issue introduced by close_on_enter (rubenwardy)

  • 0baea8c2 Ensure std::unordered_ be used on MSVC 2010 too (#4600) (SmallJoker)

  • 656faf73 Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X) (Loic Blot)

  • Server/Client Environments now have an helper to cast Player object in the right type to use it

  • Server: use RemotePlayer everywhere and remove previous added casts

  • Client: use LocalPlayer where needed

  • Environment: remove unused functions (getPlayers(), getRandomConnectedPlayer(), getNearestConnectedPlayer())

  • 9393e4a0 Speed up emerge thread by using unordered map in a few places. Looking at 25% speedup in Emerge thread on Just Test. (gregorycu)

  • 3de9ae4e Ensure std::unordered_ will be used on supported MSVC compilers (gregorycu)

  • ad163ee5 Prevent attached models from disappearing during parent reload (#4128) (Foghrye4)

  • 9978d079 VoxelArea: faster iter function (#4490) (HybridDog)

  • 09cefc3d Remove some unused attributes/class functions in server.cpp/h (Loic Blot)

  • 8bcd10b8 Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X) (Loic Blot)

  • LocalPlayer take ownership of maxHudId as it's the only caller

  • RemotePlayer take ownership of day night ratio as it's the only user

  • Pass getPlayerControl as const reference to prevent object copy on each call (perf improvement in ObjectRef::l_get_player_control call)

  • getPlayerSAO is now only RemotePlayer call

  • get/setHotbarItemCount is now RemotePlayer owned

  • Server: Use RemotePlayer instead of Player object on concerned call to properly fix the object type

  • PlayerSAO now uses RemotePlayer instead of Player because it's only server side

  • ObjectRef::getplayer also returns RemotePlayer as it's linked with PlayerSAO

  • 0264e38b Lua_api.txt: Add biome and nodeupdate documentation (paramat) Add missing documentation for 'register_biome' and 'clear_registered_biomes'. Add documentation for 'nodeupdate_single'. 'nodeupdate' is not yet documented due to a bug it causes.

  • d4a2e237 Textures: Ignore unknown node in override.txt (SmallJoker)

  • 0a16e53b Fix C++11 Windows build of threading code (sfan5) The initial problem was that mutex_auto_lock.h tries to use std::unique_lockstd::mutex despite mutex.h not using C++11's std::mutex on Windows. The problem here is the mismatch between C++11 usage conditions of the two headers. This commit moves the decision logic to threads.h and makes sure mutex.h, mutex_auto_lock.h and event.h all use the same features.

  • 155288ee use unordered containers where possible (patch 4 on X) (Loic Blot) Also remove some unused parameters/functions

  • b66a5d2f Fix narrow string compiling issue on MSVC2010 (SmallJoker)

  • 667975fe Use more unordered_maps to improve performance in c++11 builds (Loic Blot)

  • 997fc59c Use relative position for nametags (SmallJoker)

  • 009a9f1c Fix macosx build by disabling postgresql upgrade (Loic Blot)

  • de83c29b Fix crash regression when chatting in the ncurses console (est31) Fixes #4579, a regression introduced by commit

d4c76258e37337ea585cf24d8e05b50a30fa307d "Chat: new settings to prevent spam"

  • 61d1751d Travis: build matrix improvements + CPP11 build (Loic Blot)

  • 7fab86a4 Compilation fix (Loic Blot)

  • 613797a3 Replace various std::map with UNORDERED_MAP + various cleanups (Loic 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

  • 5f084cd9 Make some maps unordered to improve performance * This permit to improve performance on C++11 builds * use some existing typedefs in tools maps * minor code style changes (Loic Blot)

  • d4c76258 Chat: new settings to prevent spam (Loic Blot) Added the following chat coreside features

  • Chat messages length limit

  • Message rate limiting

  • Message rate kicking

Note:

  • handleChat now takes RemotePlayer pointer instead of u16 to remove useless lookups

  • 1079aeaa Mapblock_mesh_generate_special: Improve performance (paramat) Remove uses of std::map. Make sure we use ContentFeatures reference not value. Original commit by gregorycu.

  • 61e112b4 Textures: New 'smoke puff' texture from TNT mod (paramat)

  • fcfa418c Fix build/warning on non X11 platforms (est31)

  • 89dbc0a2 Builtin/falling: Add fallback vector in case of nil 'wallmounted to dir' (paramat) The fallback vector is in case 'wallmounted to dir' is nil due to voxelmanip placing a wallmounted node without resetting a pre-existing param2 value that is out-of-range for wallmounted. The fallback vector corresponds to param2 = 0.

  • 2516c516 Forceloading: Transient forceloads (raymoo) Adds a flag to forceload_block which lets you turn off persistence for that forceload.

  • 077b6cfa Formspec: Add container[] and container_end[] elements (rubenwardy)

  • eb0e9d56 Allow nothing to be selected from formspec parameters (sfan5)

  • 3a95054d Fix typo in core.after (#4560) (Rui)

  • c0e56c60 Update default controls in README.txt (Wuzzy)

  • 56ea77ea Mgv7: Avoid mid-air spawn on disabled mountain terrain, optimise function (paramat) 'getSpawnLevelAtPoint()' did not account for disabled mountains, it was possible to be spawned in mid-air where a mountain surface would have been.

Avoid check for river area if rivers are disabled.

  • 33a606c0 Fix android build (est31) Fixes #4493.

  • 45a9145a Only include keycode unittests in client build (fixes #4559) (sfan5)

  • cc0b3c1c Add keycode.cpp unittests (sfan5)

  • c3e1ab85 Rewrite keycode.cpp (Keycode handling & names) (sfan5)

  • cd2c8ade Conf.example: Re-add deleted noise parameter documentation (paramat) Re-add documentation of noise parameter formats. Re-add 'mgv5_np_ground' noise parameters in group format. Both these were deleted through auto-generation of conf.example. Add note to builtin/mainmenu/dlg_settings_advanced.lua that this documentation must be preserved.

  • 9fa562f8 Update library versions in buildbot (sfan5) The libraries updated in this commit were built with a set of scripts: https://gist.github.com/sfan5/780c24313c164d34634e18677683b9a3 Building new library versions or just using a different MinGW version is now way easier. This means Windows builds no longer need to use ancient library versions just because nobody knows how to build them.

  • af4c2107 Don't use ZLIB_WINAPI if the required DLL is not provided to CMake (sfan5) This allows you to use an stdcall zlib (zlib1.dll instead of zlibwapi.dll) when building Minetest for win32.

  • 3a57e525 Do not serialize empty NodeMetadata (sfan5) This commit fixes #4516, though note that this will gradually fix MapBlocks as they are used/modified and thus re-serialized.

  • 5091cb5e Builtin: Change error to warning for light_source > 14 (paramat)

  • 679c8de6 Increase default font size by 1 (James Stevenson)

  • abb6fba2 Fix a typo and use proper deprecation notification system (est31) Fix a typo pointed out by @thecow275.

Also, use the deprecated notification system which respects the deprecated_lua_api_handling setting.

  • 3aefa5d3 Register.lua: Throw error if node 'light_source' > core.LIGHT_MAX (paramat) Add 'core.LIGHT_MAX = 14' to builtin/game/constants.lua with the intention to replace misplaced 'default.LIGHT_MAX = 14' in Minetest Game. Add comment in light.h requiring the constant be changed in both places. Add lighting bug warning to note in lua_api.txt. There are hundreds of mod uses of 15 which causes a lighting bug.

  • 297546af Lua_api.txt: Add note of maximum value for node 'light_source' (paramat) Maximum is 14. A value of 15 (reserved for direct sunlight) causes a lighting bug.

  • 1475c1b1 Add an [invert: texture modifier (Thomas--S) Inverts the given channels of the base image. Mode may contain the characters "r", "g", "b", "a". Only the channels that are mentioned in the mode string will be inverted.

  • 6e30dd05 Collision: Improve performance by combining 6 vectors into 1 using a struct (ShadowNinja)

  • b8859505 Decorations: Generalise 'spawn by' to be used by all decoration types (paramat) In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.

  • b77cee14 Allow escaping of texture names when passed as an argument to a modifier (sfan5)

  • 9dd22aeb Fix "unknown CMake command "check_library_exists" (#4517) (Eric Mountain) Adds CMakeLists.txt include to fix this issue:

$ cmake . -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE
-DCMAKE_BUILD_TYPE=Release -DENABLE_CURL=TRUE -DENABLE_CURSES=FALSE
-DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=FALSE
-DENABLE_POSTGRESQL=FALSE -DENABLE_SOUND=FALSE -DENABLE_LUAJIT=TRUE
-DIRRLICHT_SOURCE_DIR=$HOME/irrlicht-1.8.4 -LH ... CMake Error at src/CMakeLists.txt:339 (check_library_exists): Unknown CMake command "check_library_exists". ...

  • d83bcf2c Plantlike meshoptions: fix degrotate. (#4512) (Auke Kok) This snuck in with the meshoptions patch and accidentally kills degrotate plants. Thanks to @hybriddog for finding this.

  • af4b63ff fix missing parameters in some mentions of entity callbacks (raymoo)

  • 403dada8 Return nil on empty get_area() (#4508) (James Stevenson)

  • c0cd7aa3 Anticheat: Use the physics_override modifiers aswell (SmallJoker)

  • 2de8c22a Make getStackMax return the correct maximal stack size (SmallJoker)

  • aa331663 Add minetest.unregister_item and minetest.register_alias_force (paly2)

  • 7eacdc7b Run updatepo.sh (est31)

  • fe497573 Translated using Weblate (Danish) (Rui) Currently translated at 30.2% (271 of 895 strings)

Don't end with '\n'.

  • 6cf0ab37 Translated using Weblate (Japanese) (Rui) Currently translated at 50.0% (448 of 895 strings)

This is a merger of two commits.

  • 7f8703ef Translated using Weblate (Danish) (Thomas Wagner Nielsen) Currently translated at 27.3% (245 of 895 strings)

  • 048ba0d2 Translated using Weblate (German) (bse666) Currently translated at 98.5% (882 of 895 strings)

  • 03ba5832 Translated using Weblate (Polish) (Mateusz Mendel) Currently translated at 42.4% (380 of 895 strings)

  • efa2635d Translated using Weblate (Polish) (Jakub Mendel) Currently translated at 42.4% (380 of 895 strings)

  • 45f8ae9e Translated using Weblate (Portuguese (Brazil)) (Bruno Borges) Currently translated at 87.8% (786 of 895 strings)

Enhancements

  • bc1fcc45 Translated using Weblate (Portuguese) (Bruno Borges) Currently translated at 64.9% (581 of 895 strings)

  • 9f326ea9 Translated using Weblate (Serbian (cyrillic)) (lisacvuk) Currently translated at 33.2% (298 of 895 strings)

  • 6cd2ccb3 Translated using Weblate (French) (Jean-Baptiste) Currently translated at 99.5% (891 of 895 strings)

  • f9d5ea43 Translated using Weblate (French) (Onyx Steinheim) Currently translated at 99.4% (890 of 895 strings)

This is a merger of two commits.

  • f3ee6b99 Translated using Weblate (Chinese (Taiwan)) (Jeff Huang) Currently translated at 100.0% (895 of 895 strings)

  • 3b0f7659 Document keymap_autorun in settingtypes.txt and minetest.conf.example (#4486) (Rui)

  • 1f2ff860 Update minetest.conf.example and settings_translation_file.cpp (est31)

  • 78ff5c19 Fix background formspec elements from interfering with each other (rubenwardy) Fixes #4397

  • fbe4a926 Settingtypes.txt: Clarify comments, correct spelling (red-001)

  • 51e13ae5 Builtin: Disallow registering users with the same name (SmallJoker) Prevents duplicate names: 'NickName', 'nickname', 'NICKNAME'. Skips already registered users, so they can connect as usual.

  • e10fee00 Allow fields to choose whether they close on enter press (rubenwardy)

  • 4330c63e Submit name of field on enter key press (rubenwardy)

  • fb20b451 Camera: Higher frequency limit for view/hand bobbing and footsteps (paramat) Rebased and tuned version of Calinou's original pull request.

'm_view_bobbing_speed' controls the frequency of view bobbing, hand bobbing and footsteps, it was limited to a maximum of 40 (walking frequency) so did not increase if player speed was modified by a 'speed buff', a sprinting mod or modified in .conf or advanced settngs.

This commit raises the limit to 70 which is suitable for sprinting.

  • e58a55aa Make plantlike drawtype more fun (Auke Kok) Adds several new ways that the plantlike drawtype mesh can be changed.

This requires paramtype2 = "meshoptions" to be set in the node definition. The drawtype for these nodes should be "plantlike".

These modifications are all done using param2. This field is now a complex bitfield that allows some or more of the combinations to be chosen, and the mesh draw code will choose the options based as neeeded for each plantlike node.

bit layout: bits 0, 1 and 2 (values 0x1 through 0x7) are for choosing the plant mesh shape: 0 - ordinary plantlike plant ("x" shaped) 1 - ordinary plant, but rotated 45 degrees ("+" shaped) 2 - a plant with 3 faces ("*" shaped) 3 - a plant with 4 faces ("#" shaped) 4 - a plant with 4 faces ("#" shaped, leaning outwards) 5 through 7 are unused and reserved for future mesh shapes.

bit 3 (0x8) causes the plant to be randomly offset in the x,z plane. The plant should fall within the 1x1x1 nodebox if regularly sized.

bit 4 (0x10) causes the plant mesh to grow by sqrt(2), and will cause the plant mesh to fill out 1x1x1, and appear slightly larger. Texture makers will want to make their plant texture 23x16 pixels to have the best visual fit in 1x1x1 size.

bit 5 (0x20) causes each face of the plant to have a slight negative Y offset in position, descending up to 0.125 downwards into the node below. Because this is per face, this causes the plant model to be less symmetric.

bit 6 (0x40) through bit 7 (0x80) are unused and reserved for future use.

!(https://youtu.be/qWuI664krsI)

  • d767f025 Client: disable pre v25 init sending by default (est31) Disable the ability to connect to old servers by default to improve password security.

If people still want to connect to old (0.4.12 and earlier) servers, they can flip the send_pre_v25_init setting.

Add the ability to detect if we've tried to connect to a server which only supports the pre v25 init protocol, and show an apropriate error message. Most times the error will already be catched at the serverlist level, the detection mechanism only acts as last resort, because the "Connection timed out" error message that would be shown otherwise would be very confusing.

Automatic "fixing" of this condition is not desired, as it would allow for downgrade attacks.

As already 161 of the 167 servers on the serverlist support the new srp based auth protocol (> 96%), the breakage should be minimal.

Follow up of commit

af30183124d40a969040d7de4b3a487feec466e4 "Add option to not send pre v25 init packet"

Also change the pessimistic assumption of masterlist server versions to optimistic, in order to avoid buggy behaviour (favourites not in the serverlist would be denied to connect to, etc).

  • 0b0075e6 Move on join and on leave messages to lua (#4460) (Xunto)

  • cafa400f gettext.h: include before defining the gettext macro (#4452) (kahrl) Fixes #4446: a syntax error that happens if something else (such as or in certain libstdc++ versions) includes <libintl.h> later, which contains a function declaration for gettext that gets mangled by the macro.

See the added comment in gettext.h and the discussion in #4446/#4452 for details.

  • f092dac9 Also support X11 icon for minetest copies installed via make install (#4407) (est31) Fixes #4323.

  • 65901402 Tidy up generate_from_settingtypes.lua a bit. (Tim)

  • Multiline strings

  • Table-concat instead of String-concats

  • string.rep instead of loop-concat

  • string.format %q instead of manual quotation by gsub

  • Assert writeable files

  • Generate new settings_translation_file

  • ba501273 Move generation from settingtypes out of dlg_settings_advanced (Tim) Avoids unreachable code linter warning by moving generation code (of minetest.conf.example and settings_translation_file.cpp) out of dlg_settings_advanced.

Due to passing the settings, also it avoids reading the settings file twice.

Instead of activating the code by changing the active if-clauses, its activation is now done by uncommenting the loadfile() statement.

  • a4962240 Fix for failure to find jsoncpp in android build (#4456) (Rogier-5) Commit 4503b5 did not update the android build script.

  • 7f4c6f32 Mapblock mesh: Fix updateFastFaceRow tiling issue (obneq) Increase maximum length of tiled node rows from 2 to mapblock size.

  • 5c0e6595 Script API: Make the craft recipe field 'method' consistent (SmallJoker)

  • 986d70cc Lua_api.txt: Change 'maxwear' to 'uses' in 'tool_capabilities' (DonBatman) 'maxwear' has been deprecated for over 3 years Add spaces around '=' nearby

  • f21dae63 Add an [opacity: texture modifier. Makes the base image transparent according to the given ratio. r must be between 0 and 255. 0 means totally transparent. 255 means totally opaque. Useful for texture overlaying. (Thomas--S)

  • c4e77b40 Update AppData file with more URLs and keywords (sfan5)

  • b11720af Use the standard to_string() functions for C++11 (#4279) (Rogier-5) If compiling according to a C++ version before C++11, then define std::to_string ourselves.

Add a to_wstring version as well

As std::to_string() for floating point types uses %.6f as floating point format converter, instead of %G, it needs special care.

To preserve ftos() behavior (which is expected to use the %G format converter), it no longer uses to_string().

  • 35f47e54 Add infotext containing entity type (e.g. mobs:cow) to unknown entities (#4431) (Rogier-5) If a mod is disabled, or upgraded without sufficient backward compatibility, then entities it has put into the world become unknown, and continue moving around, but are completely unrecognisable.

This change allows the player to see their type, and therefore which mod is or was responsible.

  • 48b3bb98 couple of memory leaks fixes. (David Carlier)

  • 1be3894e Update the version of irrlicht to 1.8.3, add steps for Sqlite3 (DLaboratory) Also add note for 64-bit Windows users

  • 82494b8c Zooming the camera requires the 'zoom' privilege (Ben Deutsch)

  • d1df0984 Document zoom_fov in settingtypes.txt and minetest.conf.example (Ben Deutsch)

  • 2c31b792 Add zoom, tweakable with zoom_fov, default key: Z (like optifine) (Esteban I. Ruiz Moreno)

  • c013c73f Lua->C getintfield() use lua_tointeger (#4408) (Tomas) previously function used tonumber which returned float this caused errors in large numbers and resulted in obj-def-handlers being invalid when retrived from lua tables in c

  • 4503b509 Fixes for compiling with a newer (system) jsoncpp (#4429) (Rogier-5)

  • Move included json code to jsoncpp subdirectory

This is needed to avoid having to specify the minetest src directory as a system include when fixing the json includes.

  • Fix json includes

They used "", so that the compiler searches the project's directory first. The result was that when compiling with a system jsoncpp, the project's own version of json.h was still included, instead of the system version.

The includes now use <>, so a system location, or one specified with '-Ilocation' is searched only.

  • Fix for jsoncpp deprecated function warning

When compiling with a newer version of jsoncpp (and ENABLE_SYSTEM_JSONCPP=true), jsoncpp emits a warning about a deprecated function that minetest uses.

  • 058a869b Permit usage of std::unordered_map & std::unorderered_set on c++11 compilers (#4430) (Ner'zhul) This fallback to std::map & std::set for older compilers

Use UNORDERED_SET as an example in decoration and ore biome sets

Use UNORDERED_MAP as an example in nameidmapping

  • 8df89db3 Add simulation category (Rémi Verschelde)

  • b6d845ad Decorations: Fix decoration height check errors (paramat) Fix height check comparison from '>=' to '>'. Fix getHeight() for schematic decorations to account for 'deco place center y' flag and for how normal placement sinks schematic 1 node into the ground.

Jungletrees were not being placed at y = 46, y = 47 despite having an acceptable 16 nodes of height above ground surface.

  • ea12da93 Mapgen: Remove unused 'flat' and 'trees' flags from mg_flags (paramat) When the 'flat' and 'trees' flags were moved into mgv6_spflags they were left in mg_flags in an attempt to support old mgv6 worlds. However their appearence in mg_flags causes confusion, also, later, old-world support was found to be broken for mgv6 worlds with 'notrees'.

This commit cleans up the mess and comes a month after a thread warning of the change, and explaining the required action, was posted in the news subforum. Only old mgv6 worlds with 'flat' or 'notrees' are affected, a small minority of worlds, the required action being correctly setting these flags in mgv6_spflags.

Disable a section of the 'map settings manager' unit test which is to be changed as it is causing problems for pull requests.

  • fca8e538 Fix l_request_insecure_environment not ignoring all whitespace (#4395) (Dorian Wouters) l_request_insecure_environment didn't ignore all whitespace in the secure.trusted_mods config option.

Replaces std::remove with std::remove_if and the isspace function.

  • 4ec66719 test_map_settings_manager: Fix Wunused-result warning (est31)

  • 9edc984b Porting: Fix endless loop if image format is not recognized (est31)

  • e559f871 texture_packs.txt: Document special textures (SmallJoker)

  • 927adf9b Documentation: Create texture_packs.txt (rubenwardy) Combine texture_overrides.txt and sections of lua_api.txt

  • 573b50ab lua_api.txt: Document how to properly clear node metadata (mtango688)

  • cc01c3cb Update README.txt (#4368) (Nathaniel Olsen)

  • Update README.txt

As of Ubuntu 16.10, libpng12-dev is replaced with libpng12-0, since libpng12-0 is available in 16.04 repositories, I think that needed to be changed.

Also I changed 'git-core' to 'git' for fedora users, keep it consistent with the ubuntu/debian instructions.

  • Update README.txt

  • 6b74e196 buildbot: retrieve short commit hash properly (Fernando Carmona Varo) Instead of trying to manually parse the output of 'git show' which can be different across different git configurations, properly use the 'git rev-parse' command that is intended for this purpose.

  • 919d9d79 Increase android versionCode (#4350) (Ner'zhul) This little update is due to a packaging problem when uploading on play store. They don't permit to re upload an APK with same version code. This case was a fail on openssl packaged version which was old and rejected by Google but they don't remove the APK then i should increase the version code to permit having it on play store

  • 8a98cbda Upright sprite objects: Horizontally flip the front image (SmallJoker) For consistent horizontal sprite structure when seen from front and back Fix code style

  • 2cb0f649 Main menu, lua_api.txt: Fix mod/texture pack screenshot size issues (Wuzzy) Recommend mod screenshot size in lua_api.txt Adjust displayed screenshot size of texture packs Document texture pack files in lua_api.txt

  • c8b4beda Builtin: Add core.MAP_BLOCKSIZE constant (Tim)

  • 58eb5f39 Builtin: Fix check for a player object in core.check_player_privs (Tim) core.check_player_privs accepts as first argument a name or player object, but just tested for a string. This caused crashes inside builtin, when being passed any unexpected types.

This provides a better (duck-typing like) test, better error reporting.

  • f833159a Update minetest.conf.example and the settings translation file (est31)

  • 2ba8ad1d Mgvalleys / cavegen: Place riverbed nodes under river water (paramat) When a CavesNoiseIntersection tunnel intersects a river place biome 'riverbed' nodes in tunnel entrance instead of biome 'top' nodes.

  • 97c76315 lua_api.txt: Remove tooltip checkbox[] element (James Stevenson)

  • 6621daee HTTP lua API docs: correct some function references (est31)

  • d7060c21 Builtin/profiler: Replace game profiler (#4245) (Tim) Use the setting "profiler.load" to enable profiling. Other settings can be found in settingtypes.txt.

  • /profiler print [filter] - report statistics to in-game console

  • /profiler dump [filter] - report statistics to STDOUT and debug.txt

  • /profiler save [format [filter]] - saves statistics to a file in your worldpath

    • txt (default) - same treetable format as used by the dump and print commands
    • csv - ready for spreadsheet import
    • json - useful for adhoc D3 visualizations
    • json_pretty - line wrapped and intended json for humans
    • lua - serialized lua table of the profile-data, for adhoc scripts
  • /profiler reset - reset all gathered profile data. This can be helpful to discard of any startup measurements that often spike during loading or to get more useful min-values.

[filter] allows limiting the output of the data via substring/pattern matching against the modname.

Note: Serialized data structures might be subject to change with changed or added measurements. csv might be the most stable, due to flat structure.

Changes to the previous version include:

  • Updated and extended API monitoring

  • Correct calculation of average (mean) values (undistorted by idleness)

  • Reduce instrumentation overhead.

  • Fix crashes related to missing parameters for the future and occasional DIV/0's.

  • Prevent issues caused by timetravel (overflow, timejump, NTP corrections)

  • Prevent modname clashes with internal names.

  • Measure each instrumentation individually and label based on registration order.

  • Labeling of ABM's and LBM's for easier classification. Giving several ABM's or LBM's the same label will treat them as one. Missing labels will be autogenerated based on name or registration order.

  • Configurable instrumentation and reporting. Skip e.g. builtin if you don't need it.

  • Profile the profiler to measure instrumentation overhead.

  • d6865c4d Lua_api.txt: Fix description of node drop behaviour (Duane)

  • 91f68e7d Treegen: Improve use of signed vs. unsigned integers (paramat) To fix GCC 6.1.1 compilation warning: 'assuming signed overflow does not occur when assuming that (X - c) > X is always false'

  • 7eeb735c Run updatepo.sh (est31)

  • 24ca754b Update minetest.conf.example, and settings_translation_file.cpp (est31)

  • e323ba4f Translated using Weblate (French) (Onyx Steinheim) Currently translated at 100.0% (887 of 887 strings)

  • 23933dcb Translated using Weblate (Dutch) (ikmaak) Currently translated at 89.6% (795 of 887 strings)

  • bda12ddd Translated using Weblate (Indonesian) (Muhammad Rifqi Priyo Susanto) Currently translated at 55.8% (495 of 887 strings)

  • 8667566f Translated using Weblate (Spanish) (Roberto Mengíbar Fernández) Currently translated at 59.0% (524 of 887 strings)

  • 18c2aed1 Translated using Weblate (French) (Guillaume Robert) Currently translated at 91.2% (809 of 887 strings)

  • e07247f8 Translated using Weblate (Chinese (China)) (arsdragonfly) Currently translated at 75.1% (667 of 887 strings)

  • c9c07ae7 Translated using Weblate (Serbian (cyrillic)) (Лазар Вукановић) Currently translated at 31.5% (280 of 887 strings)

  • ac20a518 Added translation using Weblate (Serbian (cyrillic)) (Лазар Вукановић)

  • 235d2ed2 Translated using Weblate (Esperanto) (Tim) Currently translated at 32.2% (286 of 887 strings)

  • c7cd76f6 Translated using Weblate (Chinese (China)) (susan) Currently translated at 74.1% (658 of 887 strings)

  • 4c530dea Fix typos (#4298) (Snipie)

  • 27905f1a Ubuntu build HOWTO: Suggest to install git instead of git-core (est31) The package docs for the git-core Ubuntu package in all supported Ubuntu versions, including 12.04 say:

This is a transitional dummy package. The 'git-core' package has been renamed to 'git', which has been installed automatically. This git-core package is now obsolete, and can safely be removed from the system if no other package depends on it.

Fixes #4109

  • 9db78dc4 Fix -Wterminate warnings in rollback.cpp as well (est31) Fix #4137 for rollback.cpp as well.

  • 483cca78 Fix -Wterminate warning on GCC 6 (est31) Fixes #4137

  • 795f1c75 Fix warning in porting::setXorgWindowIcon when building without X11 (#4288) (Jay Arndt)

  • 281e9f39 Adding minetest.clear_craft (Foghrye4) Modifications by est31: grammar fixes in doc + error messages and a little style fix, no functional change.

  • 7a532056 Use mathematical function to determine yaw direction (sfan5)

  • 6014e725 Fix for cropped text "Toggle Cinematic" (Snipie)

  • 538af97d Remove cinematic toggle on F8 (rubenwardy) Also update cinematic mode's description to include mouse

  • 5d4d3f83 Finally set a window icon on X11 (est31) Since the creation of minetest, it had no window icon on X11. Now we have one.

The misc/minetest-xorg-icon-128.png file is a rendering of the misc/minetest.svg file with inkscape, created with something like:

inkscape -z -e misc/minetest-xorg-icon-128.png -w 128 -h 128 misc/minetest.svg

  • c1bdb552 Temporarily disable "testStartStopWait" Threading unit test on mac (est31) The "testStartStopWait" unit test is unreliably failing on mac, for some time already. See bug #3786.

Having the unittest fail unreliably doesn't help anybody but mostly inhibits the main feature of travis builds: to test PRs for regressions.

Therefore, disable the specific unit test for until bug #3786 is fixed.

  • 1dfd977e Fix & make linux conditionals uniform (#4278) (Rogier-5) The source used a hodge-podge of different combinations of different macros to check for linux: 'linux', '__linux', 'linux'.

As 'linux' is standard (Posix), and the others are not, the source now uniformly uses linux. If either linux or __linux are defined, it is made sure that linux is defined as well.

  • f6491470 Disable joysticks per default for now (est31) It seems that various different devices register as Joysticks on linux, and their presence has caused lots of confusion amongst minetest users.

Therefore, disable the joystick feature.

Closes #4261 Closes #4221

  • e1aa98fe Remove top left minetest watermark (est31) Move version information into the window caption.

On popular player request.

Fixes #4209.

  • 3c63c304 Add MapSettingsManager and new mapgen setting script API functions (kwolekr) 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.
  • 92705306 Mapgen: Refactor mapgen creation and management (kwolekr)
  • 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
  • 70e2c1c7 Remove old docs. We have VCS history anyways. (#4266) (Pavel Puchkin)

  • b6eef1c0 openbsd's port fix for non Linux systems w/o libRT (David Carlier) X11 headers are not always in expected locations, add them to include list.

Modifications by est31: indentation fixes, commit message improved

  • 80cebdc2 Only allow strings to be passed to minetest.global_exists (#4253) (HybridDog) Sometimes you accidentally forget the quotes when using global_exists, this makes minetest abort if you did so.

M builtin/common/strict.lua

  • ab7a5c4f Also shut down when SIGTERM was received (est31) Fixes #4251

  • 9997e203 Mgflat/fractal/v7/valleys: Denser 3D noise tunnels (paramat) Reduce spread from 96 to primes 61 and 67 (either side of 64) Prime spreads help to keep 3D noise periodic features unaligned 'cave width' 0.2 to preserve tunnel width Reduce octaves to 3 to improve network structure

  • fa0bbbf9 Player: New get_look, set_look API (raymoo) Deprecate get_look / set_look pitch / yaw

  • 04fb1091 Dungeons: Generalise use, add capabilities, various modifications (paramat)

  • Generalise node names to c_wall and c_alt_wall

  • Remove 'mossratio' and instead disable alt_wall loop if c_alt_wall == CONTENT_IGNORE

  • Use one generalised 3D noise for alternative wall nodes and in mgv6 create moss distribution similar to the previous

  • Rename rarity noise to density noise and enable the option of multiple dungeons per chunk determined by the value. Recreate previous distribution

  • Add parameters for min and max rooms per dungeon

  • Add dungeon y limits

  • Integrate river water properly

Generalisation is needed now that we have sandstone and desert stone dungeons by default and can choose any node for alternative structure. The current code is based around cobble dungeons with mossycobble alternative nodes, the 2 noises controlling the alternative nodes are based on wetness.

Enabling multiple dungeons per chunk with definable number of rooms allows the option of very dense and complex underground structures that could interconnect to create megastructures. Y limits are added to be consistent with other mapgen elements, and enable locaton of dungeon or megastructure realms as part of our 'stacked realms' philosophy.

  • 39a9e987 Builtin/game/item: Add place_param2 nodedef field (Auke Kok) This allows a nodedef to specify a fixed value for param2 to be used for all normal placements.

There are several uses for this:

  • nodes that require param2 to be set to a non-zero value for internal mod use. E.g. leafdecay could use this to detect that leaves are played by players.
  • force wallmounted or facedir value at placement at placement

This overrides any player look direction or other on-the-fly param2 setting during placement.

  • 1b8dbf07 Move unknown node message when applying texture overrides to infostream (#4218) (Yutao Yuan) Texture packs have no way to know what nodes are available, so this shouldn't be a error message.

  • a39d5362 Sky.cpp: Improve code style. Define sky colours as SColor (paramat)

  • 559dd994 Make node timers more efficient (Ekdohibs)

  • 27aff22a Random misc. warning fixes and cleanups (kwolekr)

  • Fix unused c_sand member warning in Valleys Mapgen
  • Fix some code style
  • Make some std::string params const ref
  • 33b874fe Settings: Clean up settings changed callback code (kwolekr)

  • 817fea63 Fix android build (est31) Thanks to @Wayward1 for reporting the bug.

Fixes #4212.

  • dac40af6 Server: Add reason for leave to on_leaveplayer callbacks (Diego Martinez)

  • b24d21d1 Sky: Darker, bluer sky and improved horizon haze at night (paramat) Add new colours 'skycolour_bright_night', 'bgcolour_bright_night' and enable these between sunset end and sunrise start Night sky has same hue as day sky but is darker and more saturated Night horizon haze (bgcolour) is slightly less saturated and slightly brighter than night sky, to be consistent with daytime horizon haze

  • 3ef71edd Sky: Fix sunrisebg texture motion (#4199) (Paramat) Top of texture no longer shows above horizon during night and day

  • c7297e55 Lua_api.txt: Split long lines. Capitalise 'Biome API'. Minor edits (paramat)

  • d4457ef4 Mapgen: Optimize biomemap creation by combining with generateBiomes (kwolekr)

  • d24f3841 Biome API: Add per-biome riverbed material and depth (paramat) Mgvalleys: Remove riverbed sand placement from base terrain generation Riverbed material placement moved to MapgenBasic::generateBiomes() Document fields and add note that the biome API is still unstable

  • 7841f1c5 Mapgen: Performance improvement and fixes for updateLiquid (#4065) (MillersMan)

  • Adds only ~100 nodes per chunk to trans_liquid with similar processing time
  • Adds liquid nodes themselves instead of potential solid nodes below them
  • CONTENT_IGNORE nodes are interpreted as if they continue their neighborhood
  • This allows liquid columns to span multiple chunks without being interrupted
  • NOTE: Expects an one-node border in generation chunk without liquid changes
  • 109c7e33 Biomes: Define and use biome_t for biome IDs (kwolekr)

  • 8ed467d4 PcgRandom: Fix/improve documentation (kwolekr)

  • dfbdb5bc Change internal type for seeds to s32 (kwolekr) This fixes value truncation (and therefore incompatibility) on platforms with an LP32 data model, such as VAX or MS-DOS.

  • 2060fd9c Initial Gamepad support (est31) Adds initial ingame gamepad support to minetest.

Full Formspec support is not implemented yet and can be added by a later change.

  • 1e86c89f Input related generalisations (est31)

  • Move key types into own file

  • Use Generalized input methods in game.cpp

  • 7ea4a03c Sapier's fix for the RESEND RELIABLE problem (#4170) (Robert Kiraly)

  • 56999801 Mgv7: Always carve river channels in mountain terrain (paramat) Previously, rivers were sometimes blocked by vertical walls of mountain terrain due to river carving being disabled when base terrain height was below water_level - 16 Remove now unused base terrain heightmap created in generateTerrain()

  • 14ef2b44 Add colored text (not only colored chat). (Ekdohibs) Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.

  • 1d40385d Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/ (TriBlade9)

  • 0e44af9f Translated using Weblate (Hebrew) (yuval hreman) Currently translated at 7.8% (70 of 887 strings)

  • 6792447d Translated using Weblate (Russian) (Andrey K) Currently translated at 57.2% (508 of 887 strings)

  • 5e9663d3 Translated using Weblate (Italian) (Emon Omen) Currently translated at 100.0% (887 of 887 strings)

  • 30cd77a3 Translated using Weblate (Ukrainian) (Fixer) Currently translated at 39.3% (349 of 887 strings)

  • dc33ecad Translated using Weblate (Russian) (Sergey) Currently translated at 57.0% (506 of 887 strings)

This is a merger of three commits.

  • 526c978f Translated using Weblate (Russian) (Vasily Pavlov) Currently translated at 57.1% (507 of 887 strings)

  • 3842c3de Translated using Weblate (German) (Wuzzy) Currently translated at 100.0% (887 of 887 strings)

  • 27db9292 Add minetest.check_password_entry callback (est31) Gives a convenient way to check a player's password.

This entirely bypasses the SRP protocol, so should be used with great care.

This function is not intended to be used in-game, but solely by external protocols, where no authentication of the minetest engine is provided, and also only for protocols, in which the user already gives the server the plaintext password.

Examples for good use are the classical http form, or irc, an example for a bad use is a password change dialog inside formspec.

Users should be aware that they lose the advantages of the SRP protocol if they enter their passwords for servers outside the normal entry box, like in in-game formspec menus, or through irc /msg s,

This patch also fixes an auth.h mistake which has mixed up the order of params inside the decode_srp_verifier_and_salt function.

Zeno-: Added errorstream message for invalid format when I committed

  • 4134d8ad protection_bypass priv can now be revoked in singleplayer (#4169) (Sokomine)

  • a9bc7dc4 Remove unused code in s_security.cpp (#4172) (Zeno-) Note that the macro CHECK_FILE_ERR implements the code removed

  • d499ec48 Particles: Add option to remove particles on collision (Auke Kok) Adds the particle option collision_removal = bool

Some particles are hard to use right now since they either go through solid blocks (without collision detection), and with collision detection enabled they (e.g. raindrops) would just stop dead on the floor and sit there until they expire, or worse, scrape along a wall or ceiling.

We can solve the problem by adding a boolean flag that tells the particle to be removed if it ever collides with something. This will make it easier to add rain that doesn't fall through your roof or stick on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired unconditionally, causing them to be treated like normal expired particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide many times with nodes, and this reduces the amount of collisions to 1 (max), which may end up reducing particle load on the client.

  • 62d15ac7 Add base64 encoding and decoding to the lua api. (#3919) (red-001)

  • c4e083f7 Disallow external linkage for default Cavegen NoiseParams (kwolekr)

  • c8fd2326 Dungeongen: Remove dependency on Mapgen (kwolekr)

  • fd0efb21 Mapgen: Combine dungeon generation code (kwolekr)

  • 08109017 Mapgen: Deduplicate common constructor code (kwolekr)

  • 0df5c01a Mapgen: Remove calculateNoise from most mapgens (kwolekr) This commit moves noise calculation to the functions where the noise is actually required, increasing the separation of concerns and level of interdependency for each mapgen method. Valleys Mapgen is left unmodified.

  • c5968049 Mapgen V7: Remove now-unused ridge heightmap (kwolekr)

  • 548d99bb Cavegen: Move V5-style caves to CavesNoiseIntersection (kwolekr)

  • 6151f7bc Cavegen: Minor misc. fixes (kwolekr)

  • Convert instances of numeric literal doubles to floats
  • Move dswitchint to a local variable now that being a member is unnecessary
  • Improve const correctness
  • Indentation fixes
  • b1eb757e Fix undefined evaluation order when constructing random vectors (kwolekr) MSVC and GCC evaluate parameters in right-to-left order, whereas Clang evaluates in left-to-right order, and of course, an optimization could leave the order of evaluation completely indeterminate.

This commit fixes all instances of the error by explicitly assigning the results of expressions that use PseudoRandom::next() or range() to their respective vector components.

The right-to-left evaluation behavior is preserved since Clang is much less commonly used to compile Minetest than GCC and MSVC combined, and would therefore cause the least harm.

  • 5b05f75a Cavegen: Re-add small caves to CavesRandomWalk (kwolekr)

  • db1b4dc8 Cavegen: Remove CavesRandomWalk dependency on Mapgen (kwolekr)

  • 68b1cd8d Cavegen: Merge instances of repetitive surface level-finding code (kwolekr)

  • a605d690 Cavegen: Remove CavesV6 dependency on Mapgen (kwolekr)

  • bf258376 Cavegen: Rename CaveV6 to CavesV6 (kwolekr)

  • Add comment explaining why it exists
  • Remove unused 'flooded' variable
  • Rename shadowed variable
  • Fix some code style
  • 1bb5eb1d Cavegen: Merge CaveV5 and CaveV7 into CavesRandomWalk (kwolekr)

  • 9b5c492b Fix MgStoneType and BiomeType enum names (kwolekr)

  • 87bc39dc Mapgen: Combine generateBiomes, dustTopNodes, and generateCaves (kwolekr) This commit condenses the above methods into a single implementation used by V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.

  • 76f48564 Move biome calculation to BiomeGen (kwolekr) 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.

  • fa6b21a1 Tell irrlicht if we handle a key or not. (est31) We can remove the function in MtNativeActivity now as it serves precisely that purpose: to tell irrlicht that we handled the esc key.

TODO for later:

  • Perhaps try to find a more performant container than KeyList

  • ef100f12 Fix rollback.txt migration (ShadowNinja) Broken by b1965ac20922e3722392114bd63a22b403dcbe98. This also prepares the begin and commit statements only once.

  • 22f78ea3 Fix irrlicht version checking macro for tooltip_height calculation (Craig Robbins)

  • 725edc78 Move updateTextures and fillTileAttribs to ContentFeatures (Ekdohibs)

  • 423d8c1b Tolerate packet reordering in the early init process (est31) Fixes a bug where packet reordering made the server give the client two peer ids instead of one. This in turn confused reliable packet sending and made connecting to the server fail.

The client usually sends three packets at init: one "dummy" packet consisting of two 0 bytes, and the init packet as well as its legacy counterpart. The last one can be turned off since commit af30183124d40a969040d7de4b3a487feec466e4, but this is of lower relevance for the bug. The relevant part here is that network packet reorder (which is a normal occurence) can make the packets reach the server in different order.

If reorder puts the dummy packet further behind, the following would happen before the patch:

  1. The server will get one of the init packets on channel 1 and assign the client a peer id, as the packet will have zero as peer id.

  2. The server sends a CONTROLTYPE_SET_PEER_ID packet to inform the client of the peer id.

  3. The next packet from the client will contain the peer id set by the server.

  4. The server sets the m_has_sent_with_id member for the client's peer structure to true.

  5. Now the dummy packet arrives. It has a peer id of zero, therefore the server searches whether it already has a peer id for the address the packet was sent from. The search fails because m_has_sent_with_id was set to true and the server only searched for peers with m_has_sent_with_id set to false.

  6. In a working setup, the server would assign the dummy packet to the correct peer id. However the server instead now assigns a second peer id and peer structure to the peer, and assign the packet to that new peer.

  7. In order to inform the peer of its peer id, the server sends a CONTROLTYPE_SET_PEER_ID command packet, reliably, to the peer. This packet uses the new peer id.

  8. The client sends an ack to that packet, not with the new peer id but with the peer id sent in 2.

  9. This packet reaches the server, but it drops the ACK as the peer id does not map to any un-ACK-ed packets with that seqnum. The same time, the server still waits for an ACK with the new peer id, which of course won't come. This causes the server to periodically re-try sending that packet, and the client ACKing it each time.

Steps 7-9 cause annoyances and erroneous output, but don't cause the connection failure itself. The actual mistake that causes the connection failure happens in 6: The server does not assign the dummy packet to the correct peer, but to a newly created one. Therefore, all further packets sent by the client on channel 0 are now buffered by the server as it waits for the dummy packet to reach the peer, which of course doesn't happen as the server assigned that packet to the second peer it created for the client. This makes the connection code indefinitely buffer the TOSERVER_CLIENT_READY packet, not passing it to higher level code, which stalls the continuation of the further init process indefinitely and causes the actual bug.

Maybe this can be caused by reordered init packets as well, the only studied case was where network has reliably reordered the dummy packet to get sent after the init packets.

The patch fixes the bug by not ignoring peers where m_has_sent_with_id has been set anymore. The other changes of the patch are just cleanups of unused methods and fields and additional explanatory comments.

One could think of alternate ways to fix the bug:

  • The client could simply take the new peer id and continue communicating with that. This is however worse than the fix as it requires the peer id set command to be sent reliably (which currently happens, but it cant be changed anymore). Also, such a change would require both server and client to be patched in order for the bug to be fixed, as right now the client ignores peer id set commands after the peer id is different from PEER_ID_INEXISTENT and the server requires modification too to change the peer id internally. And, most importantly, right now we guarantee higher level server code that the peer id for a certain peer does not change. This guarantee would have to be broken, and it would require much larger changes to the server than this patch means.

  • One could stop sending the dummy packet. One may be unsure whether this is a good idea, as the meaning of the dummy packet is not known (it might be there for something important), and as it is possible that the init packets may cause this problem as well (although it may be possible too that they can't cause this).

Thanks to @auouymous who had originally reported this bug and who has helped patiently in finding its cause.

  • f64a6259 Fix a m_camera not used warning fix pointed by clang (Loic Blot)

  • ce42ff9c Implement a PostgreSQL backend (Loic Blot)

  • 0f184d77 Gitignore: ignore idea and ninja files (HybridDog)

  • 643ac9dd Item entities: Don't show description as infotext (paramat) Partially reverts #3547 Infotext remains optional for objects, empty by default

  • 88acda02 Fix tooltip height for versions of irrlicht < 1.8.2 (Craig Robbins) Version 1.8.2 of irrlicht changed the way that IGUIStaticText::getTextHeight() works and since that release properly deals with newlines.

From irrlicht changes.txt for 1.8.2, "IGUIStaticText::getTextHeight returns now the correct height for texts with newlines even WordWrap is not set."

  • 8ba6d9f2 Implement DatabaseException for databases (nerzhul)

  • 8b940c00 Add on_punchnode callback (Wayward One)

  • 14340145 DB::loadBlock copy removal & DB backend cleanup * Remove the copy from db::loadBlock by using a pointer to the destination * cleanup db backend, the child backend doesn't have to set their functions as virtual (Loic Blot)

  • decbd396 Really fix ncurses lookup on Arch Linux (sfan5) Commit 27ee8d8943080a5dd735c9faa47c726604bafdff forgot to add the paths without ncursesw/ to the find_path() call

  • 7a828de1 Android: enable parallelism for main target too (est31) This adds to the changes that commit

98d16e0d9a945f5f48462c05f26ae4bde2db5731 "Android: Tell make about sub-makes to speed up build"

did, and enables parallel builds for minetest itself as well.

  • 01a784bd Documentation: Remove incorrect and excessive mapgen flags text (paramat)

  • fb31bd38 Continue with 0.4.14-dev (sfan5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment