Mineclonia/mods/ENTITIES
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
..
drippingwater Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
mcl_boats Fix mob-in-boat crash in Minetest 5.5-dev 2022-01-26 18:25:08 +01:00
mcl_burning burning: prevent adding multiple entities+huds 2021-11-12 01:16:16 +01:00
mcl_falling_nodes Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
mcl_item_entity Add debug command to acquire a written book 2021-07-30 17:22:33 +02:00
mcl_minecarts Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
mcl_mobs Give mobs sunburn at correct light level 2021-11-19 03:14:36 +01:00
mcl_paintings Protect paintings, fix https://git.minetest.land/MineClone2/MineClone2/issues/1080 2021-02-09 23:34:04 +00:00
mobs_mc Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
mobs_mc_gameconfig Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
modpack.conf Add a couple of modpack.conf files 2019-01-07 00:52:05 +01:00