Correct variable name

This commit is contained in:
Gunter Labes 2025-03-15 22:09:02 +01:00
parent 85c00bb161
commit ee24ef6102
No known key found for this signature in database
GPG Key ID: C0C7B971CC910216
4 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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<wb::manager> whiteboard = std::shared_ptr<wb::manager>();
game_classification *classification = nullptr;
bool simulation_ = false;
bool simulation = false;
}

View File

@ -55,5 +55,5 @@ namespace resources
extern pathfind::manager *tunnels;
extern actions::undo_list *undo_stack;
extern std::shared_ptr<wb::manager> whiteboard;
extern bool simulation_;
extern bool simulation;
}