remove show parameter from move_unit

This commit is contained in:
gfgtdf 2024-11-12 02:07:37 +01:00 committed by sevu
parent 24ad4cb9d2
commit cc2914c1c6
3 changed files with 4 additions and 13 deletions

View file

@ -1277,10 +1277,9 @@ namespace { // Private helpers for move_unit()
}//end anonymous namespace
static void move_unit_internal(
bool show_move, unit_mover& mover)
static void move_unit_internal(unit_mover& mover)
{
show_move = show_move && !resources::controller->is_skipping_actions();
bool show_move = !resources::controller->is_skipping_replay() && !resources::controller->is_skipping_actions();
const events::command_disabler disable_commands;
// Attempt moving.
@ -1329,7 +1328,6 @@ static void move_unit_internal(
void execute_move_unit(const std::vector<map_location>& steps,
bool continued_move,
bool skip_ally_sighted,
bool show_move,
move_unit_spectator* move_spectator)
{
// Evaluate this move.
@ -1339,7 +1337,7 @@ void execute_move_unit(const std::vector<map_location>& steps,
return;
}
move_unit_internal(show_move, mover);
move_unit_internal(mover);
}
void teleport_unit_and_record(const map_location& teleport_from,

View file

@ -155,7 +155,6 @@ void execute_move_unit(
const std::vector<map_location> &steps,
bool continued_move,
bool skip_ally_sighted,
bool show_move = true,
move_unit_spectator* move_spectator);
}//namespace actions

View file

@ -304,13 +304,7 @@ SYNCED_COMMAND_HANDLER_FUNCTION(move, child, spectator)
bool skip_sighted = child["skip_sighted"] == "all";
bool skip_ally_sighted = child["skip_sighted"] == "only_ally";
bool show_move = !resources::controller->is_skipping_replay() ;
if ( current_team.is_local_ai() || current_team.is_network_ai())
{
show_move = show_move && !prefs::get().skip_ai_moves();
}
actions::execute_move_unit(steps, skip_sighted, skip_ally_sighted, show_move, dynamic_cast<actions::move_unit_spectator*>(&spectator));
actions::execute_move_unit(steps, skip_sighted, skip_ally_sighted, dynamic_cast<actions::move_unit_spectator*>(&spectator));
return true;
}