format move.cpp code

This commit is contained in:
gfgtdf 2017-07-25 00:12:55 +02:00
parent 821e27c34f
commit ac38604f94

View file

@ -347,52 +347,48 @@ namespace { // Private helpers for move_unit()
unit_mover::unit_mover(const std::vector<map_location> & route, unit_mover::unit_mover(const std::vector<map_location> & route,
move_unit_spectator *move_spectator, move_unit_spectator *move_spectator,
bool skip_sightings, bool skip_ally_sightings) : bool skip_sightings, bool skip_ally_sightings) :
spectator_(move_spectator), : spectator_(move_spectator)
skip_sighting_(skip_sightings), , skip_sighting_(skip_sightings)
skip_ally_sighting_(skip_ally_sightings), , skip_ally_sighting_(skip_ally_sightings)
playing_team_is_viewing_(resources::screen->playing_team() == , playing_team_is_viewing_(resources::screen->playing_team() == resources::screen->viewing_team() || resources::screen->show_everything())
resources::screen->viewing_team() , route_(route)
|| resources::screen->show_everything()), , begin_(route.begin())
route_(route), , full_end_(route.end())
begin_(route.begin()), , expected_end_(begin_)
full_end_(route.end()), , ambush_limit_(begin_)
expected_end_(begin_), , obstructed_(full_end_)
ambush_limit_(begin_), , real_end_(begin_)
obstructed_(full_end_),
real_end_(begin_),
// Unit information: // Unit information:
move_it_(resources::gameboard->units().find(*begin_)), , move_it_(resources::gameboard->units().find(*begin_))
orig_side_(( assert(move_it_ != resources::gameboard->units().end()), , orig_side_(( assert(move_it_ != resources::gameboard->units().end()), move_it_->side() ))
move_it_->side() )), , orig_moves_(move_it_->movement_left())
orig_moves_(move_it_->movement_left()), , orig_dir_(move_it_->facing())
orig_dir_(move_it_->facing()), , goto_( is_ai_move() ? move_it_->get_goto() : route.back() )
goto_( is_ai_move() ? move_it_->get_goto() : route.back() ), , current_side_(orig_side_)
current_side_(orig_side_), , current_team_(&resources::gameboard->get_team(current_side_))
current_team_(&resources::gameboard->get_team(current_side_)), , current_uses_fog_(current_team_->fog_or_shroud() && current_team_->auto_shroud_updates())
current_uses_fog_(current_team_->fog_or_shroud() && , move_loc_(begin_)
current_team_->auto_shroud_updates()), , do_move_track_(resources::game_events->pump().wml_tracking())
move_loc_(begin_),
do_move_track_(resources::game_events->pump().wml_tracking()),
// The remaining fields are set to some sort of "zero state". // The remaining fields are set to some sort of "zero state".
zoc_stop_(map_location::null_location()), , zoc_stop_(map_location::null_location())
ambush_stop_(map_location::null_location()), , ambush_stop_(map_location::null_location())
blocked_loc_(map_location::null_location()), , blocked_loc_(map_location::null_location())
ambushed_(false), , ambushed_(false)
show_ambush_alert_(false), , show_ambush_alert_(false)
wml_removed_unit_(false), , wml_removed_unit_(false)
wml_undo_disabled_(false), , wml_undo_disabled_(false)
wml_move_aborted_(false), , wml_move_aborted_(false)
event_mutated_mid_move_(false), , event_mutated_mid_move_(false)
fog_changed_(false), , fog_changed_(false)
sighted_(false), , sighted_(false)
sighted_stop_(false), , sighted_stop_(false)
teleport_failed_(false), , teleport_failed_(false)
enemy_count_(0), , enemy_count_(0)
friend_count_(0), , friend_count_(0)
ambush_string_(), , ambush_string_()
ambushers_(), , ambushers_()
moves_left_(), , moves_left_()
clearer_() , clearer_()
{ {
if ( !is_ai_move() ) if ( !is_ai_move() )
// Clear the "goto" instruction during movement. // Clear the "goto" instruction during movement.