Properly log advancing to the next scenario

Restores part of commit 2932d30.
This commit is contained in:
Gunter Labes 2019-07-24 13:35:38 +02:00 committed by GitHub
parent f0f1aab935
commit 90c7335228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -299,6 +299,8 @@ void game::start_game(const socket_ptr& starter)
DBG_GAME << debug_sides_info() << std::endl;
DBG_GAME << "****" << std::endl;
// If the game was already started we're actually advancing.
const bool advance = started_;
started_ = true;
// Prevent inserting empty keys when reading.
const simple_wml::node& multiplayer = get_multiplayer(level_.root());
@ -306,7 +308,7 @@ void game::start_game(const socket_ptr& starter)
const bool save = multiplayer["savegame"].to_bool();
LOG_GAME
<< client_address(starter) << "\t" << player_connections_.find(starter)->name() << "\t"
<< "started" << (save ? " reloaded" : "") << " game:\t\"" << name_ << "\" (" << id_
<< (advance ? "advanced" : "started") << (save ? " reloaded" : "") << " game:\t\"" << name_ << "\" (" << id_
// << ") with: " << list_users(players_, __func__) << ". Settings: map: " << s["id"]
<< ") with: " << list_users(players_, __func__)
<< ". Settings: map: " << multiplayer["mp_scenario"]