1
0
Fork 0
VoxeLibre-Fork-Pixel/mods/ENTITIES
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
..
mcl_boats Fix mob-in-boat crash in Minetest 5.5-dev 2022-02-15 11:17:01 +01:00
mcl_burning Fix crash on startup during immediate runtime by mcl_burning 2021-11-13 10:55:24 +08:00
mcl_dripping Rename drippingwater to mcl_dripping in mod.conf and readme.txt 2021-11-15 21:54:16 +01:00
mcl_falling_nodes Move code of making anvils destroy items when falling 2021-07-05 12:28:14 +00:00
mcl_item_entity Rework XP API 2021-11-03 19:36:57 +01:00
mcl_minecarts Break minecart if it's near a cactus (Fix #924) 2021-11-02 22:58:03 +01:00
mcl_mobs Merge branch 'master' into xp 2021-11-03 20:14:08 +01:00
mcl_paintings Merge branch 'master' into polish-translation 2021-06-02 10:14:25 +00:00
mobs_mc Slime splitting: nil check child to prevent crash (that happened on oysterity-mcl2) 2021-12-09 18:11:05 +01:00
mobs_mc_gameconfig [mobs_mc_gameconfig] fix warning 2021-05-23 14:54:20 +02:00
modpack.conf Add a couple of modpack.conf files 2019-01-07 00:52:05 +01:00