Re: Bad numbers for p****enger revenues, at least in the 'goods window'
Reply #3 –
Neroden,
thank you very much for your investigations! I have changed the offending line of code to:
const uint16 journey_minutes = ((float)distance / (((float)welt->get_average_speed(way_type) * bonus) / 100)) * welt->get_einstellungen()->get_distance_per_tile() * 60;
That fix will be applied in the next release. As to the structural changes that you suggest - there is much sense in making all the code less "hairy" (but I cannot practically unilaterally change Simutrans-Standard code just to make it less "hairy" if I do not intend a function change, as the advantages of the cleaner code would be outweighed by the disadvantages of having to deal with merge conflicts when Simutrans-Standard is updated), but my time is very limited, and I have spent a rather long time trying to get the automatic convoy replacer to work properly with the new network code and add a few features to it while I'm about it, and I still have a long way to go. If you feel like helping, however, it would be very much appreciated! Are you able to get hold of the code via Github and compile it yourself?
Thank you again for the most helpful bug report.