Bug #27
var action 02 based on var60 doesn´t work
0%
Description
TTDPatch Version: 2.5b1
Patch Feature: var action 02
When using CB1D together with a var.action02 based on var 60:
-1 *15 02 00 00 82 60 xx 00 FF 01 FE FF 01 03 20 FF
this allows to add four vehicles of ID "xx" but after the fourth vehicle is attached, no more other vehicle (e.g. a coach) may be attached. However, when removing one of the vehicles "xx", coaches may be added and then that fourth vehicles may be restored, although then its not possible to move one of those vehicles inside the consist.
Same goes for other numbers of vehicles and BTW, according to the Wiki, the real number of vehicles should be returned, not starting from 0?
History
Updated by Josef Drexler over 18 years ago
This works as intended. Once 4 vehicles of ID xx are attached, the callback returns FF20 and therefore disallows more vehicles.
To allow vehicles other than "xx" to be attached, the default case needs to check the ID of the vehicle being attached (using type 81, var. C6) and return FFFE if it's not "xx".
Updated by Anonymous over 18 years ago
Var 60 only returns how many vehicles of that ID are attached currently, and doesn't consider the to-be-attached one, therefore this is necessary.