aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainhud.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-01-04 12:02:00 +0100
committerorwell96 <mono96.mml@gmail.com>2017-01-04 12:02:00 +0100
commit853a9e690eeeb48aa1a13faa66db0a91d5b49390 (patch)
tree51451d08e10cedda4128c1e29848524a00baf2a7 /advtrains/trainhud.lua
parenta9d43ce2ca3bfd703428d248c0839e53ffd76f27 (diff)
downloadadvtrains-853a9e690eeeb48aa1a13faa66db0a91d5b49390.tar.gz
advtrains-853a9e690eeeb48aa1a13faa66db0a91d5b49390.tar.bz2
advtrains-853a9e690eeeb48aa1a13faa66db0a91d5b49390.zip
Add Automatic Train Control system
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