Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trains sometimes change direction at stations marked continue #468

Open
amalon opened this issue Feb 1, 2023 · 1 comment
Open

Trains sometimes change direction at stations marked continue #468

amalon opened this issue Feb 1, 2023 · 1 comment

Comments

@amalon
Copy link

amalon commented Feb 1, 2023

Info

Please provide the following information:

  • BkCommonLib Version (/train version): v1.19.3-v2-SNAPSHOT (build: 1288)
  • TrainCarts Version (/train version): v1.19.3-v2-SNAPSHOT (build: 1453)
  • Server Type and Version (/version): git-Paper-39 (MC: 1.19)

Bug

Description

Sometimes I find that trains will get stuck causing a big queue of trains behind it. It often happens before a station marked "continue", as if the train has left the station in the wrong direction and ended up deadlocked facing another train that is itself deadlocked facing the stuck train.

I used to change the station sign to have an explicit departure direction, but since switching to tccoaster node signs directions don't seem reliable, so I went back to "continue".

Having discovered /train status I can see that a train appears to have swapped direction at a station, and only moved about a block (in the wrong direction) before halting waiting for a train that should be considered behind it.

I'm unsure what triggers the behaviour. The server does automatically shut down when not in use, so its conceivable its related to saving & reloading train state when a train is at a station.

Possibly related, my trains are made of carts which are constructed programmatically using flipped so that the end carts face opposite direction.

Steps to reproduce

  • A station with "continue"
  • A train spawner firing trains towards the station every so often (and destroy at the other end)
  • Trains set to wait for other trains
  • Probably some other condition I haven't quite figured out, since it doesn't always happen.
@bbayu123
Copy link
Collaborator

bbayu123 commented Jul 1, 2023

Just don't use continue. You were using an explicit departure direction before. Use that. The directions are very reliable.
Make sure you use the latest version of BKCommonLib and TrainCarts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants