aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/signals.lua6
-rw-r--r--advtrains/trainlogic.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index 1940518..68cbc70 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -73,7 +73,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
-- new signal API
advtrains = {
set_aspect = function(pos, node, asp)
- if asp.main != 0 then
+ if asp.main ~= 0 then
advtrains.ndb.swap_node(pos, {name = "advtrains:retrosignal_on"..rotation, param2 = node.param2}, true)
else
advtrains.ndb.swap_node(pos, {name = "advtrains:retrosignal_off"..rotation, param2 = node.param2}, true)
@@ -132,7 +132,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
-- new signal API
advtrains = {
set_aspect = function(pos, node, asp)
- if asp.main != 0 then
+ if asp.main ~= 0 then
advtrains.ndb.swap_node(pos, {name = "advtrains:signal_on"..rotation, param2 = node.param2}, true)
else
advtrains.ndb.swap_node(pos, {name = "advtrains:signal_off"..rotation, param2 = node.param2}, true)
@@ -200,7 +200,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
-- new signal API
advtrains = {
set_aspect = function(pos, node, asp)
- if asp.main != 0 then
+ if asp.main ~= 0 then
advtrains.ndb.swap_node(pos, {name = "advtrains:signal_wall_"..loc.."_on", param2 = node.param2}, true)
else
advtrains.ndb.swap_node(pos, {name = "advtrains:signal_wall_"..loc.."_off", param2 = node.param2}, true)
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index fa7a40e..be0d60e 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -417,7 +417,7 @@ function advtrains.train_step_b(id, train, dtime)
if emerg then
v_target_apply(v_targets, VLEVER_EMERG, 0)
else
- v_target_apply(v_targets, VLEVER_EMERG, braketar)
+ v_target_apply(v_targets, VLEVER_BRAKE, braketar)
end
else
v_target_apply(v_targets, VLEVER_ROLL, train.tarvelocity)