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

Move to a rail that is not defined by the PlayerPath #1124

Open
ginga81 opened this issue Feb 25, 2025 · 3 comments
Open

Move to a rail that is not defined by the PlayerPath #1124

ginga81 opened this issue Feb 25, 2025 · 3 comments

Comments

@ginga81
Copy link
Contributor

ginga81 commented Feb 25, 2025

Description

I wrote each rail to come together at 1375m, and switched rails with Playerpath.
However, when I moved to it, I moved to a rail that I have no recollection of defining, and additionally, when I returned to Rail 0, I moved to a location that I had not defined, so I don't understand.
I loaded the three attached files into RouteViewer, but even when searching for the same distance, I could not find the corresponding rail.
I tried to debug it, but determined this to be difficult, so I will submit this as an issue.

Image
Image

using route files
routefiles.zip

fail-playerpath.mp4

Reproduction

I apologize for not being able to submit it as a sample as this is production data, under constructing.

Route

I apologize for not being able to submit it as a sample as this is production data, under constructing.

Train

any

Logs

RouteViewer and OpenBVE not report any bugs.

Related information

My PC's spec:
OS:Ubuntu 22.04 LTS 64bit pro with realtime-kernel
CPU:AMD® Ryzen 7 2700x eight-core processor × 16
Memory:31.3GB
Graphic:AMD Radeon RX 590 Series (polaris10, LLVM 15.0.7, DRM 3.57, 6.8.0-47-generic)

@ginga81
Copy link
Contributor Author

ginga81 commented Feb 26, 2025

If we go before 1375m, say 1350m, we can move to any track.

But it fails at the most important 1375m.

So I tried running it with old test data and it worked fine.

When the coordinates go wrong, I thought it would be helpful if the log output showed what information was used to move to which track.

Even if I press the P key to output the track number, no rail is displayed for the mysterious number.

When I searched the file as I did at the beginning, all the coordinates were aligned to 1375m, and there were no other strange coordinates.

Furthermore, if you want to return to Rail 0, if you forcefully change it from 1650m to the front, it should return.
However, it doesn't return and is thrown into the air.
I couldn't figure out which command in these three files was affecting it, and I was at a loss as to what to do, so I proposed this.

There are a lot of rail numbers used, but they're probably unrelated.

@ginga81
Copy link
Contributor Author

ginga81 commented Feb 27, 2025

player-path-not-good.zip
I thought it would be difficult because it was production data, but I was able to delete it successfully.
It doesn't jump at 1625m like in the video, but I was able to reproduce the initial behavior when moving from Rail 1 to Rail 2, and the behavior up to 1625m.

@leezer3
Copy link
Owner

leezer3 commented Mar 2, 2025

OK, it took me a little while to figure out what's going on there.

The issue is that you're issuing the .RailEnd command in the same block as the switch.
This means that the switch isn't actually being created, and the position is moving on the direction vector of the last valid block.

Move the RailEnd command one block past the switch, and it should work OK.

I'll see if I can make this handle things better, but will be later on in the week before I do so.

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