fix modification for mp campaigns

the dependency manager cannot handle campaigns, we work around this by forcing the dependency manager to accept any modifications for campaigns.

fixes https://gna.org/bugs/index.php?22334
This commit is contained in:
gfgtdf 2014-11-21 15:03:47 +01:00
parent bb207f4d8e
commit 385115727f

View file

@ -637,8 +637,9 @@ void create_engine::set_current_mod_index(const size_t index)
bool create_engine::toggle_current_mod()
{
bool force = (current_level_type_ == level::CAMPAIGN || current_level_type_ == level::SP_CAMPAIGN);
bool is_active = dependency_manager_.is_modification_active(current_mod_index_);
dependency_manager_.try_modification_by_index(current_mod_index_, !is_active);
dependency_manager_.try_modification_by_index(current_mod_index_, !is_active, force);
parameters_.active_mods = dependency_manager_.get_modifications();