Skip to content

Commit

Permalink
fix carryover in mp
Browse files Browse the repository at this point in the history
previously only the hosts team would get carryover gold.
  • Loading branch information
gfgtdf committed Mar 2, 2015
1 parent 71164fb commit 54d0835
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/game_initialization/playcampaign.cpp
Expand Up @@ -100,13 +100,17 @@ static void show_carryover_message(saved_game& gamestate, playsingle_controller&
int turns_left = std::max<int>(0, tod.number_of_turns() - tod.turn());
BOOST_FOREACH(team &t, teams)
{
if (!t.persistent() || t.lost() || !t.is_local_human())
if (!t.persistent() || t.lost())
{
continue;
}
int finishing_bonus_per_turn = map.villages().size() * t.village_gold() + t.base_income();
int finishing_bonus = t.carryover_bonus() ? finishing_bonus_per_turn * turns_left : 0;
t.set_carryover_gold(div100rounded((t.gold() + finishing_bonus) * t.carryover_percentage()));
if(!t.is_local_human())
{
continue;
}
if (persistent_teams > 1) {
report << "\n<b>" << t.current_player() << "</b>\n";
}
Expand Down

0 comments on commit 54d0835

Please sign in to comment.