diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-01-04 12:02:00 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-01-04 12:02:00 +0100 |
commit | 853a9e690eeeb48aa1a13faa66db0a91d5b49390 (patch) | |
tree | 51451d08e10cedda4128c1e29848524a00baf2a7 /advtrains/trainhud.lua | |
parent | a9d43ce2ca3bfd703428d248c0839e53ffd76f27 (diff) | |
download | advtrains-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.lua | 2 |
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 |