This patch adds a new convoi status FAHRPLANEINGABE_LOADING.
When schedule/line is changed, status of convoi which is loading will be FAHRPLANEINGABE_LOADING instead of FAHRPLANEINGABE. Which means that convoi knows last status was LOADING, thus convoi can continue to loading after changing its schedule/line if possible.
This will solve 3 problems below which will be happen after changing schedule/line.
- At airports or station with choose sign/signal, convoi will stop loading and move to scheduled position. This might cause deadlock with train.
- if convoi is moving on scheduled position, convoi stop at that position and start loading. So, convoi can't load 100%.
- If convoi is loading but is not on scheduled position, convoi move to scheduled position. This is ugly.
Very nice idea. Maybe you can introduce functions like is_fahrplaneingabe() to avoid long statements as
state==convoi_t::FAHRPLANEINGABE || state==convoi_t::FAHRPLANEINGABE_LOADING
any chanche to have also dedicated images for loading vehicles?
I think the patch by z9999 for getting the next position right, will also solve this issue.
Your patch is completely wrong.
Think why we need to think last state is loading or not.
I explained on the first post.
Quote from: z9999 on August 20, 2009, 11:34:03 AM
- if convoi is moving on scheduled position, convoi stop at that position and start loading. So, convoi can't load 100%.
[EDIT]Bad news.
This patch completely doesn't work because of your another patch (http://forum.simutrans.com/index.php?topic=2828.msg33340#msg33340).
The state is loading can be checked in sync_step during FAHRPLANEINGABE as you did in your other patch correctly. Thus there is no need for the new state.
Quote from: prissi on September 27, 2009, 08:22:29 AM
The state is loading can be checked in sync_step during FAHRPLANEINGABE as you did in your other patch correctly. Thus there is no need for the new state.
No, it doesn't. It doesn't work like my patch.