Closed Git-Forked closed 3 years ago
Verified issue. Working on a fix.
I've checked in an initial fix for this issue.
It prevents digging protected areas, and doesn't crash with latency_protection, but has a problem with the latter's damage option. Tunnelmaker digs many dozens of nodes at once, and checks protection for each node in turn. If this is done in a protected area with latency_protection's damage option enabled, the player will die.
I'm going to think about this some more before I re-release to ContentDB. A couple of options are to stop digging at the first protected node, or to test all nodes before starting to dig any nodes.
Updated to test all nodes before digging tunnel. Also updated protection checks when clearing tree cover and replacing reference nodes.
Thanks for pointing out this issue.
2021-05-01 19:10:12: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): ...est/minetest/bin/../mods/latency_protection/init.lua:77: bad argument #1 to 'get_player_by_name' (string expected, got userdata) 2021-05-01 19:10:12: ERROR[Main]: stack traceback: 2021-05-01 19:10:12: ERROR[Main]: [C]: in function 'get_player_by_name' 2021-05-01 19:10:12: ERROR[Main]: ...est/minetest/bin/../mods/latency_protection/init.lua:77: in function 'is_protected' 2021-05-01 19:10:12: ERROR[Main]: ...e/minetest/minetest/bin/../mods/tunnelmaker/init.lua:354: in function 'ok_to_tunnel' 2021-05-01 19:10:12: ERROR[Main]: ...e/minetest/minetest/bin/../mods/tunnelmaker/init.lua:463: in function '?' 2021-05-01 19:10:12: ERROR[Main]: ...e/minetest/minetest/bin/../mods/tunnelmaker/init.lua:761: in function 'run_list' 2021-05-01 19:10:12: ERROR[Main]: ...e/minetest/minetest/bin/../mods/tunnelmaker/init.lua:886: in function 'dig_tunnel' 2021-05-01 19:10:12: ERROR[Main]: ...e/minetest/minetest/bin/../mods/tunnelmaker/init.lua:980: in function <...e/minetest/minetest/bin/../mods/tunnelmaker/init.lua:961>
Minetest server info:
Error causes server to shutdown.