Fixed the MP campaign gold carry over (bug #10677).

This commit is contained in:
Mark de Wever 2008-01-11 20:03:00 +00:00
parent dce3626cea
commit 29e7c90487
3 changed files with 7 additions and 3 deletions

View file

@ -25,6 +25,7 @@ Version 1.3.13+svn:
OOS errors in campaigns (bug #10624)
* :droid can now use the additional parameters on & off to enable/disable
the AI status of a side instead of toggle it (FR #9676)
* fixed the MP campaign gold carry over (bug #10677)
* sound:
* timer bell in MP starts when there are 20 seconds left and fades in
gradually for 10 seconds (fr #10559)

View file

@ -9,6 +9,7 @@ Version 1.3.13+svn:
* Multiplayer
* Revised maps: Den of Onis, Weldyn Channel.
* MP campaign gold carry over works properly now.
* User interface
* The apple key works as shortcut modifier again.

View file

@ -390,15 +390,17 @@ LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& st
(finishing_bonus_per_turn * turns_left) : 0;
for(i=teams_.begin(); i!=teams_.end(); ++i) {
if (!i->is_persistent())
continue;
player_info *player=gamestate_.get_player(i->save_id());
if (player) {
// Store the gold for all players.
player->gold = ((i->gold() + finishing_bonus)
* end_level.carryover_percentage) / 100;
player->gold_add = end_level.carryover_add;
// Only show the report for ourselves.
if (!i->is_persistent())
continue;
if(gamestate_.players.size()>1) {
if(i!=teams_.begin()) {