News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

change to convoi_t::set_schedule

Started by Dwachs, February 14, 2016, 08:55:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

prissi

This was possible then. But I think you are right, and it cannot be called while active.

Dwachs

Parsley, sage, rosemary, and maggikraut.