(svn r7630) -Fix: At the end of the quarter the old economy numbers were shifted up, and

the current economy numbers were moved to economy[0]. This was done in one
 memmove which worked because old_economy was behind cur_economy in the struct.
 Do not rely on this functionality...
pull/155/head
Darkvater 18 years ago
parent 6a2485adf7
commit dcc88094ab

@ -589,17 +589,16 @@ static void PlayersGenStatistics(void)
FOR_ALL_PLAYERS(p) { FOR_ALL_PLAYERS(p) {
if (p->is_active) { if (p->is_active) {
memmove(&p->old_economy, &p->cur_economy, sizeof(p->old_economy)); memmove(&p->old_economy[1], &p->old_economy[0], sizeof(p->old_economy) - sizeof(p->old_economy[0]));
p->old_economy[0] = p->cur_economy;
memset(&p->cur_economy, 0, sizeof(p->cur_economy)); memset(&p->cur_economy, 0, sizeof(p->cur_economy));
if (p->num_valid_stat_ent != 24) if (p->num_valid_stat_ent != 24) p->num_valid_stat_ent++;
p->num_valid_stat_ent++;
UpdateCompanyRatingAndValue(p, true); UpdateCompanyRatingAndValue(p, true);
PlayersCheckBankrupt(p); PlayersCheckBankrupt(p);
if (p->block_preview != 0) if (p->block_preview != 0) p->block_preview--;
p->block_preview--;
} }
} }

Loading…
Cancel
Save