diff --git a/README.md b/README.md index 8b7324f..765d505 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Target: Run smoothly as possible, even on laggy servers. - Rail junction switching with the 'right/left' walking keys - Handbrake with the 'back' key - Support for non-minetest_game subgames +- Descend from cart using the `sneak` key ## Settings This mod can be adjusted to fit the preference of a player or server. Use the `Settings -> All Settings` dialog in the main menu or tune your diff --git a/cart_entity.lua b/cart_entity.lua index 9cc5324..a30885c 100644 --- a/cart_entity.lua +++ b/cart_entity.lua @@ -304,6 +304,12 @@ function cart_entity:on_step(dtime) acc = -0.4 end end + if ctrl and ctrl.sneak then + -- Descend when sneak is pressed + boost_cart:manage_attachment(player, nil) + player = nil + ctrl = nil + end if acc then -- Slow down or speed up, depending on Y direction