News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Joining a public station

Started by paichtis, December 12, 2012, 03:50:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paichtis

Perhaps this a known bug...

If one adds a terminal to a public station all passengers waiting to go there are discarded.  (I noticed it with PAX - on  b.64. server -  but most probably happens with other goods too.)

prissi

This is due to passengers routed by destinations, and the internal handle of the halt changed. However, it may be very much possible to see if a different halt exists for the stations/convoi those are loaded to.

Fabio

But when merging, couldn't be possible just to look up the handler of the removed station and replace it with the new handle?

prissi

#3
The purpose of of handles is to expire when the target station does no longer exist. It only affects people in convois that change at the next stop, the people in stations are properly rerouted.


EDIT: However the freight deletion routine was only called on odd occasions. Now freight which can be delivered will be kept.

Dwachs

Imho, it would make more sense to mark convoys to 'remove stale freight', then unload such a marked convoy completely at the next halt (which triggers route search for all the cargo in haltestelle_t::liefere_an), and load again. Then no cargo gets lost that still could reach its target. Undeliverable cargo is discarded by haltestelle_t::liefere_an.  (Currently remove_stale_freigth removes all cargo on a convoy that could not reach their target with the current convoy).

What do you think? (Ofc this can wait until after next releaseTM)

prissi

#5
Marking stale seems indeed the best way. This should be added as it would cure the problem in the german game. On the server I could easily generate eternally fully loaded convois by just deleting a stop on one location and then building something new there.

I would try to release without known and easily fixable bugs.

EDIT: current routine had still errors. r6181 should work as intended.

Dwachs

Imho, there are still some border cases not covered. Patch attached. Changes:

-- make sure that always ware.ziel is bound, otherwise vehikel_t::unload_freight will drop the cargo silently
-- the check whether a halt on the schedule is a target of the cargo is dropped there, as it is the very first thing that is checked in haltestelle_t::liefere_an

Could you test please if it does not break anything else?

prissi

Thank you for spotting the thing with the bound ziel halt. But that could only occur, if there was still at least one trasnfer needed and thus the convoi was not in the stale list for this halt. Very well done.

Looks fine to me, just commit it please. It is sure better than what we have now.

Dwachs