MineClone2/mods/ENTITIES/mcl_boats
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
..
locale Update French translation (part 1) 2021-08-13 11:35:18 +02:00
models Fix #1414 2021-03-30 10:24:39 -07:00
textures Add obsidian boat that always sinks 2021-11-20 09:06:48 +01:00
init.lua Fix mob-in-boat crash in Minetest 5.5-dev 2022-02-15 11:17:01 +01:00
mod.conf working implementation + support of other mods 2021-07-20 15:47:26 +02:00
README.txt Use mod.conf in all mods, part 1 2021-03-04 15:22:14 +01:00

# mcl_boats
This mod adds drivable boats.

# Credits
## Mesh
Boat mesh (`models/mcl_boats_boat.b3d`) created by 22i.
Source: https://github.com/22i/minecraft-voxel-blender-models

License of boat model:
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>

## Textures
See the main MineClone 2 README.md file to learn more.

## Code
Code based on Minetest Game, licensed under the MIT License (MIT).

Authors include:
* PilzAdam (2012-2016)
* Various Minetest / Minetest Game developers and contributors (2012-2016)
* maikerumine (2017)
* Wuzzy (2017)
* Fleckenstein (2020-2021)