From ee24ef6102dc8f36436b831e6e5ab6fa09136731 Mon Sep 17 00:00:00 2001 From: Gunter Labes Date: Sat, 15 Mar 2025 22:09:02 +0100 Subject: [PATCH] Correct variable name --- src/ai/actions.cpp | 12 ++++++------ src/ai/manager.cpp | 2 +- src/resources.cpp | 4 ++-- src/resources.hpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ai/actions.cpp b/src/ai/actions.cpp index 00bb5e75e26..41bb943a0f7 100644 --- a/src/ai/actions.cpp +++ b/src/ai/actions.cpp @@ -279,7 +279,7 @@ void attack_result::do_execute() const unit_map::const_iterator a_ = resources::gameboard->units().find(attacker_loc_); const unit_map::const_iterator d_ = resources::gameboard->units().find(defender_loc_); - if(resources::simulation_){ + if(resources::simulation){ bool gamestate_changed = simulated_attack(attacker_loc_, defender_loc_, bc.get_attacker_combatant().average_hp(), bc.get_defender_combatant().average_hp()); sim_gamestate_changed(this, gamestate_changed); @@ -442,7 +442,7 @@ void move_result::do_execute() LOG_AI_ACTIONS << "start of execution of: "<< *this; assert(is_success()); - if(resources::simulation_){ + if(resources::simulation){ bool gamestate_changed = false; if(from_ != to_){ int step = route_->steps.size(); @@ -634,7 +634,7 @@ void recall_result::do_execute() // called, so this is a guard against future breakage. assert(location_checked_); - if(resources::simulation_){ + if(resources::simulation){ bool gamestate_changed = simulated_recall(get_side(), unit_id_, recall_location_); sim_gamestate_changed(this, gamestate_changed); @@ -781,7 +781,7 @@ void recruit_result::do_execute() // called, so this is a guard against future breakage. assert(location_checked_ && u != nullptr); - if(resources::simulation_){ + if(resources::simulation){ bool gamestate_changed = simulated_recruit(get_side(), u, recruit_location_); sim_gamestate_changed(this, gamestate_changed); @@ -882,7 +882,7 @@ void stopunit_result::do_execute() assert(is_success()); unit_map::iterator un = resources::gameboard->units().find(unit_location_); - if(resources::simulation_){ + if(resources::simulation){ bool gamestate_changed = simulated_stopunit(unit_location_, remove_movement_, remove_attacks_); sim_gamestate_changed(this, gamestate_changed); @@ -940,7 +940,7 @@ std::string synced_command_result::do_describe() const void synced_command_result::do_execute() { - if(resources::simulation_){ + if(resources::simulation){ bool gamestate_changed = simulated_synced_command(); sim_gamestate_changed(this, gamestate_changed); diff --git a/src/ai/manager.cpp b/src/ai/manager.cpp index cb3e0fa8161..5fa29a44e6c 100644 --- a/src/ai/manager.cpp +++ b/src/ai/manager.cpp @@ -422,7 +422,7 @@ void manager::remove_turn_started_observer( events::observer* event_observer ) } void manager::raise_user_interact() { - if(resources::simulation_){ + if(resources::simulation){ return; } diff --git a/src/resources.cpp b/src/resources.cpp index 0e8ec6a3e16..a91e9db793d 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -22,7 +22,7 @@ namespace resources game_data *gamedata = nullptr; filter_context *filter_con = nullptr; game_events::manager *game_events = nullptr; - game_lua_kernel *lua_kernel = nullptr; + game_lua_kernel *lua_kernel = nullptr; persist_manager *persist = nullptr; soundsource::manager *soundsources = nullptr; replay *recorder = nullptr; @@ -32,5 +32,5 @@ namespace resources actions::undo_list *undo_stack = nullptr; std::shared_ptr whiteboard = std::shared_ptr(); game_classification *classification = nullptr; - bool simulation_ = false; + bool simulation = false; } diff --git a/src/resources.hpp b/src/resources.hpp index 573856996a0..60addff7ef1 100644 --- a/src/resources.hpp +++ b/src/resources.hpp @@ -55,5 +55,5 @@ namespace resources extern pathfind::manager *tunnels; extern actions::undo_list *undo_stack; extern std::shared_ptr whiteboard; - extern bool simulation_; + extern bool simulation; }