1
0
mirror of https://github.com/SmallJoker/boost_cart.git synced 2024-12-26 02:40:18 +01:00

Descend from cart using sneak (#31)

This commit is contained in:
SmallJoker 2020-05-30 09:08:54 +02:00
parent 56f5b18dae
commit 5b53183381
2 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Target: Run smoothly as possible, even on laggy servers.
- Rail junction switching with the 'right/left' walking keys - Rail junction switching with the 'right/left' walking keys
- Handbrake with the 'back' key - Handbrake with the 'back' key
- Support for non-minetest_game subgames - Support for non-minetest_game subgames
- Descend from cart using the `sneak` key
## Settings ## 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 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

View File

@ -304,6 +304,12 @@ function cart_entity:on_step(dtime)
acc = -0.4 acc = -0.4
end end
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 if acc then
-- Slow down or speed up, depending on Y direction -- Slow down or speed up, depending on Y direction