aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-02-10 18:26:53 +0100
committerorwell96 <orwell@bleipb.de>2021-02-10 18:26:53 +0100
commit0859e50c6ea514dd5329ecc12581e0b01d1c981e (patch)
tree280517383dcd3bd209575f941e64edb18f3f7907 /advtrains
parent17e29a251102271d1a5b045dde45cd68c0e728c3 (diff)
downloadadvtrains-0859e50c6ea514dd5329ecc12581e0b01d1c981e.tar.gz
advtrains-0859e50c6ea514dd5329ecc12581e0b01d1c981e.tar.bz2
advtrains-0859e50c6ea514dd5329ecc12581e0b01d1c981e.zip
Fix manual train control
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/trainhud.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua
index 1538774..6e69455 100644
--- a/advtrains/trainhud.lua
+++ b/advtrains/trainhud.lua
@@ -43,7 +43,7 @@ function advtrains.on_control_change(pc, train, flip)
else
local act=false
if pc.jump then
- train.ctrl.user = 1
+ train.ctrl_user = 1
act=true
end
-- If atc command set, only "Jump" key can clear command. To prevent accidental control.
@@ -51,15 +51,15 @@ function advtrains.on_control_change(pc, train, flip)
return
end
if pc.up then
- train.ctrl.user=4
+ train.ctrl_user=4
act=true
end
if pc.down then
if train.velocity>0 then
if pc.jump then
- train.ctrl.user = 0
+ train.ctrl_user = 0
else
- train.ctrl.user = 2
+ train.ctrl_user = 2
end
act=true
else
@@ -82,7 +82,7 @@ function advtrains.on_control_change(pc, train, flip)
end
end
if not act then
- train.ctrl.user = nil
+ train.ctrl_user = nil
end
end
end