News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

[solved] Wrong stadt_t weight after loading savegame

Started by z9999, June 03, 2009, 12:45:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z9999

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.