Loading mp games doesn't load stats.
This commit is contained in:
parent
f591783326
commit
7564e6a0e0
2 changed files with 9 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "multiplayer_connect.hpp"
|
||||
#include "preferences.hpp"
|
||||
#include "replay.hpp"
|
||||
#include "statistics.hpp"
|
||||
#include "show_dialog.hpp"
|
||||
#include "wassert.hpp"
|
||||
#include "serialization/string_utils.hpp"
|
||||
|
@ -906,6 +907,7 @@ void connect::load_game()
|
|||
}
|
||||
|
||||
level_ = state_.snapshot;
|
||||
level_.add_child("statistics") = statistics::write_stats();
|
||||
|
||||
recorder = replay(state_.replay_data);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "multiplayer_wait.hpp"
|
||||
#include "preferences.hpp"
|
||||
#include "replay.hpp"
|
||||
#include "statistics.hpp"
|
||||
#include "util.hpp"
|
||||
#include "video.hpp"
|
||||
#include "wassert.hpp"
|
||||
|
@ -286,6 +287,12 @@ void wait::start_game()
|
|||
level_.clear_children("replay");
|
||||
}
|
||||
|
||||
config const * const stats = level_.child("statistics");
|
||||
if(stats != NULL) {
|
||||
statistics::fresh_stats();
|
||||
statistics::read_stats(*stats);
|
||||
}
|
||||
|
||||
LOG_NW << "starting game\n";
|
||||
|
||||
state_.campaign_type = "multiplayer";
|
||||
|
|
Loading…
Add table
Reference in a new issue