Skip to content

Commit

Permalink
Carts: Increase power rail acceleration to help climbs
Browse files Browse the repository at this point in the history
This is partly a workaround for a bug.
Climbs with continuous power rails were failing often due to
unexplained losses of speed leading to a reversal of direction.
The lack of acceleration on climbs meant that lost speed was not
regained.
Keeping cart speed at maximum on climbs helps reduce the chance of
reversals.

This also allows players to slowly accelerate up to full speed on a
climb without needing a horizontal run-up to reach full speed first.
It may not be possible to build the horizontal sections needed, or,
if players are replacing a previous carts mod their track
constructions, bridges, tunnels etc. will often not have the
horizontal sections needed.
Players will also sometimes need to place and enter a cart on a slope
and be able to climb.
  • Loading branch information
paramat committed Nov 27, 2016
1 parent d42ae71 commit 9bbe7f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mods/carts/rails.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ minetest.register_craft({

minetest.register_alias("default:rail", "carts:rail")


carts:register_rail("carts:powerrail", {
description = "Powered rail",
tiles = {
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
},
groups = carts:get_rail_groups(),
}, {acceleration = 4})
}, {acceleration = 5})

minetest.register_craft({
output = "carts:powerrail 8",
Expand All @@ -38,6 +39,7 @@ minetest.register_craft({
}
})


carts:register_rail("carts:brakerail", {
description = "Brake rail",
tiles = {
Expand All @@ -47,7 +49,6 @@ carts:register_rail("carts:brakerail", {
groups = carts:get_rail_groups(),
}, {acceleration = -3})


minetest.register_craft({
output = "carts:brakerail 8",
recipe = {
Expand Down

0 comments on commit 9bbe7f9

Please sign in to comment.