Hemiptera Bugtracker at bugs.linux-forks.de


collided trains are overlapping

Send replies to 112@bugs.linux-forks.de or using the Form below.
avatar From: OP
Wed, 13 Feb 2019 10:12:01 -0000

After a crash are trains still stopping in an overlapped state.


This very old bug was many times reported, because sometimes the only

way to solve it way the destruction of ine of the trains.

If I remember right it was announced that with the new TSS version of

advtrains this problem would be removed / solved.

See also #111.

avatar From: Someone else
Tue, 17 Sep 2019 20:24:01 -0000

A simple way to fix this would be by forcing the train to stand back when it collides:

--- 8a Check collision ---

if not collided then

local col_tr = advtrains.occ.check_collision(testpos, id)

if col_tr then

train.velocity = 0


collided = true

-- Now, we need to move the train so that they don't overlap (#112)

-- The testing result appears to be quite funny if you keep on

-- pressing "W", but at least we have solved the problem.

train.index = train.index - 1

-- Now, shunt the trains if in shunt mode

if train.is_shunt or col_tr.is_shunt then


train.is_shunt = nil

col_tr.is_shunt = nil

minetest.after(0,advtrains.do_connect_trains, col_tr.id, train.id, train.velocity)




This is what I get (I slightly modified the HUD but I think the most important things are still shown): https://imgur.com/a/swJM2n8


yw05 <yw05@disroot.org>

avatar From: Developer
Wed, 07 Jul 2021 20:53:01 -0000

Fixed by 1f3a4c3b

Problem still occurs for trains that are not on the same track, but this case is rare and there's no elegant way to handle this.

avatar Status Update
Wed, 07 Jul 2021 20:48:01 -0000
This bug was closed.