News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

LNWR-42ft-cor (constraints inconsitency)

Started by Vladki, February 11, 2019, 09:24:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

The 3rd class LNWR corridor coach cannot be attached to composite brake front. Due to bad constraint - previus shoud be brake-front, not brake-rear.

Here is a patch:

diff --git a/trains/lnwr-42ft-cor.dat b/trains/lnwr-42ft-cor.dat
index d0fcef524..47e0d5605 100644
--- a/trains/lnwr-42ft-cor.dat
+++ b/trains/lnwr-42ft-cor.dat
@@ -118,7 +118,7 @@
Constraint[Prev][31]=LMS-cor-brake-front
Constraint[Prev][32]=LMS-buffet
Constraint[Prev][33]=LNWR-42ft-cor-first
Constraint[Prev][34]=LNWR-42ft-cor-composite
-Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
+Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-front
Constraint[Prev][36]=LNWR-50ft-cor-first
Constraint[Prev][37]=LNWR-57ft-cor-composite
Constraint[Prev][38]=LNWR-57ft-cor-first

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Thanks for fixing. I tried it with timeline off, and found that this constraint is wrong on many more modern carriages:
Here you have the line numbers where is a constraint telling that the previous car should be brake-rear instead of brake front.
(Of course it is ok for brake-rear to be followed by brake-front, but I think that is done so that anything can follow brake-rear...)

$ grep -n 'Constraint\[Prev\]\[[0-9]*\]=LNWR-42ft-cor-brake-composite-rear' *.dat
lms-period1-cor.dat:147:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:338:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:529:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:787:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:978:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:1169:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:1427:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:1608:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:1790:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period1-cor.dat:2033:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:151:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:344:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:536:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:799:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:993:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:1185:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:1377:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:1638:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:1832:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:2025:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:2266:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lms-period3-cor.dat:2449:Constraint[Prev][50]=LNWR-42ft-cor-brake-composite-rear
lnwr-50ft-cor.dat:119:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-50ft-cor.dat:269:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-50ft-full-brake.dat:166:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-57ft-cor.dat:119:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-57ft-cor.dat:279:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-57ft-cor.dat:440:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-57ft-cor.dat:671:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-57ft-cor.dat:825:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-57ft-cor.dat:987:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-60ft-6in-diner.dat:120:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear
lnwr-60ft-6in-diner-non-clerestory.dat:120:Constraint[Prev][35]=LNWR-42ft-cor-brake-composite-rear

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki