made it so income calculations are done at the beginning of each player's turn
...instead of done for all players at the beginning of the first player's turn
This commit is contained in:
parent
6cb26ea94f
commit
b1342ab4ab
1 changed files with 12 additions and 14 deletions
|
@ -158,6 +158,18 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& terrain_config,
|
|||
team_it != teams.end(); ++team_it) {
|
||||
const int player_number = (team_it - teams.begin()) + 1;
|
||||
|
||||
if(!first_time) {
|
||||
team_it->new_turn();
|
||||
|
||||
//if the expense is less than the number of villages owned,
|
||||
//then we don't have to pay anything at all
|
||||
const int expense = team_upkeep(units,player_number) -
|
||||
team_it->towers().size();
|
||||
if(expense > 0) {
|
||||
team_it->spend_gold(expense);
|
||||
}
|
||||
}
|
||||
|
||||
gui.set_playing_team(size_t(player_number-1));
|
||||
|
||||
clear_shroud(gui,map,gameinfo,units,teams,player_number-1);
|
||||
|
@ -310,20 +322,6 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& terrain_config,
|
|||
i->second.new_turn();
|
||||
}
|
||||
|
||||
int team_num = 1;
|
||||
for(std::vector<team>::iterator it = teams.begin();
|
||||
it != teams.end(); ++it, ++team_num) {
|
||||
it->new_turn();
|
||||
|
||||
//if the expense is less than the number of villages owned,
|
||||
//then we don't have to pay anything at all
|
||||
const int expense = team_upkeep(units,team_num) -
|
||||
it->towers().size();
|
||||
if(expense > 0) {
|
||||
it->spend_gold(expense);
|
||||
}
|
||||
}
|
||||
|
||||
} catch(end_level_exception& end_level) {
|
||||
|
||||
if(end_level.result == QUIT || end_level.result == REPLAY) {
|
||||
|
|
Loading…
Add table
Reference in a new issue