From 2d8c13885aa33a0f5eb43b16a1131f187fad75e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sun, 11 Aug 2019 20:16:11 +0200 Subject: Shunting mode now couples trains on collision. Trains now get coupled when one of them is in coupling mode. --- advtrains/occupation.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'advtrains/occupation.lua') diff --git a/advtrains/occupation.lua b/advtrains/occupation.lua index 66a5a75..f5c7d88 100644 --- a/advtrains/occupation.lua +++ b/advtrains/occupation.lua @@ -175,8 +175,8 @@ function o.check_collision(pos, train_id) --atdebug("checking train",t[i],"index",idx,"<>",train.index,train.end_index) if train and idx >= train.end_index and idx <= train.index then - --atdebug("collides.") - return true + --atdebug("collides.") + return train -- return train it collided with so we can couple when shunting is enabled end end i = i + 2 -- cgit v1.2.3