DMU/EMU capacity bug

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
Nagyzee
Transport Coordinator
Transport Coordinator
Posts: 261
Joined: 05 Jun 2008 16:45
Location: Hungary

DMU/EMU capacity bug

Post by Nagyzee »

As the bug is present also in the newest nightly (r2002), I thought it's best to open a new topic for it so it doesn't get lost in the road bridge topic.

I have set up a test game with only DBSetXL and its ECS extension using r2002. So my newgrfw.cfg file is three lines long:

Code: Select all

newgrf\ttdpbasew.grf
newgrf\dbsetxlw.grf 6
newgrf\dbxl_ecs.grf
And here is the result:
Capacity bug.png
Capacity bug.png (115.9 KiB) Viewed 424 times
I've also uploaded my config file and a savegame just in case. Btw eis_os is right and the bug was probably introduced with r1966. I used r1966 before and the bug was indeed present in that version already. Now I have switched back to r1963 and that is free of this problem.
Attachments
TRT01.SV1
(167.88 KiB) Downloaded 134 times
ttdpatch.cfg
(38.46 KiB) Downloaded 127 times
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: DMU/EMU capacity bug

Post by Lakie »

I'll take a look at it when I have some free time.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: DMU/EMU capacity bug

Post by Lakie »

From what I can gather, this is because of the way the buy train routine works, it can have 2 registers used at the end (esi = second head, edi = starting head).
It appears that DaleStan's makestruc macro does not take into account this and hence only the second vehicle has a capacity set, the first one merely uses the capacity which the vehicle which used that entry before had.
I'll ask DaleStan how we can solve this issue.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: DMU/EMU capacity bug

Post by DaleStan »

This should be fixed in r2014.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 9 guests