The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Dwachs on February 14, 2016, 08:55:38 PM

Title: change to convoi_t::set_schedule
Post by: Dwachs on February 14, 2016, 08:55:38 PM
Could somebody please look at the attached patch? There is an ancient comment that gets deleted by the patch
Quote
because during a sync-step we might be called twice
However I fail to see, where this method can be called twice during sync_step. I could only envision that due to some INT_CHECK (there is none!) the sync_step will be called from within this method.

Currently, state is set to INITIAL at the beginning of the method. This will remove the convoi from the sync list during sync_step. And the convoi will never move again. Hence the patch to change the state at the end of the method.
Title: Re: change to convoi_t::set_schedule
Post by: prissi on February 19, 2016, 10:02:27 PM
This was possible then. But I think you are right, and it cannot be called while active.
Title: Re: change to convoi_t::set_schedule
Post by: Dwachs on February 23, 2016, 12:18:45 PM
this is now in r7770