Hi James,
In the following code from ware_t::can_merge_with() :
Quote
return index == w.index &&
ziel == w.ziel &&
// Only merge the destination *position* if the load is not freight
(index < 3 || zielpos == w.zielpos) &&
origin == w.origin;
I suppose the expression in blue should be index < 2 instead? Since pax and mail are hard-coded as 0 and 1 respectively.
If it is correct, then also in ware_t :
Quote
bool is_passenger() const { return index==0; }
bool is_mail() const { return index==1; }
bool is_freight() const { return index>2; }
this should also be changed to index>=2, right?
Ahh, that seems to make sense...
gerw has confirmed here (http://forum.simutrans.com/index.php?topic=2124.msg21636#msg21636) that is_freight() is correct with index>2. So, please ignore the 2nd point in my first post. Thank you for your attention.
Knightly,
wouldn't that also mean that the first one was correct, too? If index > 2 is freight, then index < 3 is non-freight, isn't it?
Sorry, I am not sure. I don't know if there will be any unexpected side-effects. But ST STD uses index<2, so probably it's safer to follow.