The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: z9999 on June 03, 2009, 12:45:36 PM

Title: [solved] Wrong stadt_t weight after loading savegame
Post by: z9999 on June 03, 2009, 12:45:36 PM
Weight of stadt_t is only updated at start of new month.
When simutrans loads saved game and append stadt, buildings are not yet appnded.
So, get_einwohner() returns wrong value and this value doesn't recalculate until next month.

So, during up to one month after loading saved game, passengers will determine their destination by wrong weight.


stadt.clear();
stadt.resize(einstellungen->get_anzahl_staedte());
for(int i=0; i<einstellungen->get_anzahl_staedte(); i++) {
stadt_t *s = new stadt_t(this, file);
stadt.append( s, s->get_einwohner(), 64 );



Solved in r2502. thank you.