Mineclonia/mods
Nils Dagsson Moskopp f89c52dff6
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-01-26 18:25:08 +01:00
..
CORE Fix typo in mcl_colors API documentation 2021-11-18 19:23:57 +01:00
ENTITIES Fix mob-in-boat crash in Minetest 5.5-dev 2022-01-26 18:25:08 +01:00
ENVIRONMENT Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
HELP Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
HUD Fix creative mode inventory search crash 2022-01-21 23:31:25 +01:00
ITEMS Fix armor rendering when wearing pumpkin 2022-01-23 20:11:55 +01:00
MAPGEN Generate pig spawners in mineshafts 2021-07-23 04:11:33 +02:00
MISC Do not crash if minetest.find_nodes_in_area() lies 2021-12-20 21:38:24 +01:00
PLAYER Fix player bone positions and properties setting 2021-12-09 04:53:45 +01:00