fix an assertion when reloading an mp game

This commit is contained in:
gfgtdf 2015-06-24 18:11:43 +02:00
parent 101e9911a2
commit b34dc86e37
2 changed files with 5 additions and 3 deletions

View file

@ -138,7 +138,9 @@ void playmp_controller::play_human_turn()
if(undo_stack_->can_undo()) {
// If we reload a networked mp game we cannot undo moves made before the save
// Becasue other players already received them
synced_context::run_and_store("update_shroud", replay_helper::get_update_shroud());
if(!current_team().auto_shroud_updates()) {
synced_context::run_and_store("update_shroud", replay_helper::get_update_shroud());
}
undo_stack_->clear();
}
if (!preferences::disable_auto_moves()) {

View file

@ -148,8 +148,8 @@ bool synced_context::run_in_synced_context_if_not_already(const std::string& com
void synced_context::default_error_function(const std::string& message, bool /*heavy*/)
{
ERR_REPLAY << "Very strange Error during synced execution " << message;
assert(false && "Very strange Error during synced execution");
ERR_REPLAY << "Unexpected Error during synced execution" << message << std::endl;
assert(!"Unexpected Error during synced execution, more info in stderr.");
}
void synced_context::just_log_error_function(const std::string& message, bool /*heavy*/)