mirror of
https://github.com/SmallJoker/boost_cart.git
synced 2024-11-23 15:13:44 +01:00
Descend from cart using sneak (#31)
This commit is contained in:
parent
56f5b18dae
commit
5b53183381
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user