aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/trainlogic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index 483ea52..d8130e9 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -470,7 +470,7 @@ function advtrains.train_step_a(id, train, dtime)
local should_check=false
for _,p in ipairs(minetest.get_connected_players()) do
- should_check=should_check or ((vector.distance(ori_pos, p:getpos())<node_range))
+ should_check=should_check or (ori_pos and ((vector.distance(ori_pos, p:getpos())<node_range)))
end
if should_check then
advtrains.update_trainpart_properties(id)