aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainhud.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/trainhud.lua')
-rw-r--r--advtrains/trainhud.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua
index 19e4f6f..e69f04a 100644
--- a/advtrains/trainhud.lua
+++ b/advtrains/trainhud.lua
@@ -11,7 +11,7 @@ local mletter={[1]="F", [-1]="R", [0]="N"}
function advtrains.on_control_change(pc, train, flip)
if pc.sneak then
if pc.up then
- train.tarvelocity = advtrains.all_traintypes[train.traintype].max_speed or 10
+ train.tarvelocity = train.max_speed or 10
end
if pc.down then
train.tarvelocity = 0