option to disable most of spmp patch
adds a bool variable in game_config which comepltely disables the configure_engine, and connect_engine in sp. Using this should fix https://gna.org/bugs/?23629 and https://gna.org/bugs/?23496 but some bugs of the spmp patch like the additional config reload in the campaigns menu are still present.
This commit is contained in:
parent
5c99ab7e69
commit
024c56459e
4 changed files with 8 additions and 4 deletions
|
@ -49,6 +49,7 @@ namespace game_config
|
|||
const int gold_carryover_percentage = 80;
|
||||
const std::string version = VERSION;
|
||||
std::string default_terrain;
|
||||
bool spmp_hotfix = false;
|
||||
#ifdef REVISION
|
||||
const std::string revision = VERSION " (" REVISION ")";
|
||||
#elif defined(VCS_SHORT_HASH) && defined(VCS_WC_MODIFIED)
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace game_config
|
|||
extern const std::string version;
|
||||
extern const std::string revision;
|
||||
extern std::string default_terrain;
|
||||
extern bool spmp_hotfix;
|
||||
|
||||
inline int kill_xp(int level)
|
||||
{
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "playcampaign.hpp"
|
||||
|
||||
#include "carryover.hpp"
|
||||
#include "game_config.hpp"
|
||||
#include "game_errors.hpp"
|
||||
#include "game_preferences.hpp"
|
||||
#include "generators/map_create.hpp"
|
||||
|
@ -360,7 +361,7 @@ LEVEL_RESULT play_game(game_display& disp, saved_game& gamestate,
|
|||
// Retrieve next scenario data.
|
||||
gamestate.expand_scenario();
|
||||
|
||||
if (gamestate.valid()) {
|
||||
if (gamestate.valid() && (game_type == game_classification::CAMPAIGN_TYPE::MULTIPLAYER || !game_config::spmp_hotfix)) {
|
||||
//note that although starting_pos is const it might be changed by gamestate.some_non_const_operation() .
|
||||
const config& starting_pos = gamestate.get_starting_pos();
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "singleplayer.hpp"
|
||||
#include "config.hpp"
|
||||
#include "config_assign.hpp"
|
||||
#include "game_config.hpp"
|
||||
#include "game_config_manager.hpp"
|
||||
#include "gui/dialogs/campaign_selection.hpp"
|
||||
#include "gui/dialogs/message.hpp"
|
||||
|
@ -115,9 +116,9 @@ bool enter_create_mode(game_display& disp, const config& game_config,
|
|||
std::cerr << "Cannot load scenario with id=" << state.get_scenario_id() << "\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
configure_canceled = !enter_configure_mode(disp, game_config_manager::get()->game_config(),
|
||||
state, jump_to_campaign, local_players_only);
|
||||
if (!game_config::spmp_hotfix) {
|
||||
configure_canceled = !enter_configure_mode(disp, game_config_manager::get()->game_config(), state, jump_to_campaign, local_players_only);
|
||||
}
|
||||
|
||||
} while (configure_canceled);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue