diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-08-11 20:16:11 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-08-11 20:16:11 +0200 |
commit | 2d8c13885aa33a0f5eb43b16a1131f187fad75e7 (patch) | |
tree | 8bddf1888edfa105c613ba38a70aea05c4aa8334 /advtrains/occupation.lua | |
parent | ef50610f675c85cb0c85eb200018896cefd0cc11 (diff) | |
download | advtrains-2d8c13885aa33a0f5eb43b16a1131f187fad75e7.tar.gz advtrains-2d8c13885aa33a0f5eb43b16a1131f187fad75e7.tar.bz2 advtrains-2d8c13885aa33a0f5eb43b16a1131f187fad75e7.zip |
Shunting mode now couples trains on collision.
Trains now get coupled when one of them is in coupling mode.
Diffstat (limited to 'advtrains/occupation.lua')
-rw-r--r-- | advtrains/occupation.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 |