VoxeLibre/mods
Nils Dagsson Moskopp adf738854a
Fix mob-in-boat crash in Minetest 5.5-dev
In Minetest 5.4.1, calling get_player_control() on a mob returned the
empty string. Minetest commit 5eb45e1ea03c6104f007efec6dd9c351f310193d
changed this, so now calling get_player_control() on a mob returns nil.

As mcl_boats defines boats that can have a player or a mob as a driver,
code like the following crashes with a changed get_player_control() API:

local ctrl = driver:get_player_control()
if ctrl.sneak then
    detach_object(driver, true)
end

Furthermore, once a world has crashed, joining it near a mob that is the
driver of a boat with such control code immediately crashes again.

When I reported this bug to Minetest, several Minetest core developers
stated that they disliked the old API and proposed other return values
for calling a mob's get_player_control() function – all different from
the empty string. Since I have some doubts that this bug will be fixed
in Minetest 5.5.0, boat code must take into account a nil return value.

Minetest issue: https://github.com/minetest/minetest/issues/11989
2022-02-15 11:17:01 +01:00
..
CORE wip mcl_damage documentation 2022-02-13 21:31:04 +01:00
ENTITIES Fix mob-in-boat crash in Minetest 5.5-dev 2022-02-15 11:17:01 +01:00
ENVIRONMENT Fix #1911, error in lightning callback 2021-11-17 00:37:11 +01:00
HELP Update French translation (part 1) 2021-08-13 11:35:18 +02:00
HUD Use set_count instead of creating a new item and checking for enchanted books 2021-11-18 17:40:32 +01:00
ITEMS fix some typos 2022-02-13 21:31:03 +01:00
MAPGEN Add stacks to enchant_uniform_randomly 2021-12-07 18:19:41 +01:00
MISC Merge pull request 'Give players fly priv when creative is enabled' (#1865) from NO11/MineClone2:privs into master 2021-10-07 15:13:04 +00:00
PLAYER Temporarily remove glitchy Elytra crash-damage 2022-01-06 21:55:01 +00:00