Page 1 of 1
[boskid][1.1.61] Train not snapping to station on curved rail
Posted: Sat Jul 30, 2022 2:56 pm
by SupplyDepoo
Locomotive doesn't snap to train stops when on curved rail (partially).
(Pls don't judge my eco-friendly spaghetti style.
)
- no-snapping.gif (5.87 MiB) Viewed 3191 times
Re: [1.1.61] Train not snapping to station on curved rail
Posted: Sat Jul 30, 2022 3:34 pm
by Koub
[Koub] I'll move this to won't fix, because I' sure it won't be. The stations are supposed to be on straight rails, almost nothing works well on curved rail stations.
Re: [1.1.61] Train not snapping to station on curved rail
Posted: Sun Jul 31, 2022 7:12 am
by ickputzdirwech
Wouldn’t be so sure about that. See
101954
Re: [1.1.61] Train not snapping to station on curved rail
Posted: Sun Jul 31, 2022 11:02 am
by boskid
Reason why locomotive was not snapping in that case is that code for snapping was implemented in a "simplified" way where it only computes distance to move a stock based only on X coordinates or only on Y coordinates and for this it was required for a locomotive to be completly vertical or completly horizontal. I did a tiny cleanup of the locomotive's snap to stop code for 1.1.64 where instead of using X or Y coordinate differences (4 completly unrelated cases, one for each main direction) it uses distance to travel along rails. In this "after cleanup" code a locomotive will also snap while it is on curved rails.
Re: [boskid][1.1.61] Train not snapping to station on curved rail
Posted: Mon Aug 01, 2022 9:06 am
by SupplyDepoo
Thanks, boskid!