[patch] goods_catg_index for convoys November 11, 2009, 11:03:27 pm As mentioned in http://forum.simutrans.com/index.php?topic=3707.msg36171#msg36171, here is the first part.http://www-user.tu-chemnitz.de/~gerw/patches/rebuild_dest_1_2862_v1.patch Quote Selected
Re: [patch] goods_catg_index for convoys Reply #1 – November 12, 2009, 11:15:39 am Hi Gerw IMHO it is not necessary to determine whether goods_catg_index has changed and call welt->set_schedule_counter() in convoi_t::recalc_catg_index(), because in convoi_t::start(), line-managed convoys will always call line->recalc_catg_index(), and lineless convoys will always call welt->set_schedule_counter().Besides, even if goods_catg_index is changed in a line-managed convoy, that doesn't necessarily mean that welt->set_schedule_counter() needs to be called. For instance, a line currently supports both pax and mail. One of its managed convoys originally supports both, but then certain vehicles are removed and now it only supports pax. The line still supports both as there are other convoys which support mail. With your code, schedule counter is incremented, which is not really necessary.Knightly Quote Selected Last Edit: November 12, 2009, 11:21:12 am by Knightly
Re: [patch] goods_catg_index for convoys Reply #2 – November 12, 2009, 11:27:17 am Thank you for your reply. You are right. I have removed it in the patch.http://www-user.tu-chemnitz.de/~gerw/patches/rebuild_dest_1_2862_v2.patch Quote Selected
Re: [patch] goods_catg_index for convoys Reply #3 – November 12, 2009, 05:21:26 pm [off-topic]BTW, "Replace" feature in Simutrans-Experimental doesn't check goods_catg_index has changed or not.So, line-managed convoys will cause problem if goods_catg_index has changed by "Replace" feature. Quote Selected