Object which contains all the possible locations a unit can move to, with associated best routes to those locations. More...
#include <pathfind.hpp>
Classes | |
struct | dest_vect |
Ordered vector of possible destinations. More... | |
struct | step |
Public Member Functions | |
paths () | |
paths (const unit &u, bool force_ignore_zocs, bool allow_teleport, const team &viewing_team, int additional_turns=0, bool see_all=false, bool ignore_units=false) | |
Construct a list of paths for the specified unit. More... | |
virtual | ~paths () |
Virtual destructor (default processing). More... | |
Public Attributes | |
dest_vect | destinations |
Object which contains all the possible locations a unit can move to, with associated best routes to those locations.
Definition at line 71 of file pathfind.hpp.
|
inline |
Definition at line 73 of file pathfind.hpp.
pathfind::paths::paths | ( | const unit & | u, |
bool | force_ignore_zoc, | ||
bool | allow_teleport, | ||
const team & | viewing_team, | ||
int | additional_turns = 0 , |
||
bool | see_all = false , |
||
bool | ignore_units = false |
||
) |
Construct a list of paths for the specified unit.
This function is used for several purposes, including showing a unit's potential moves and generating currently possible paths.
u | The unit whose moves and movement type will be used. |
force_ignore_zoc | Set to true to completely ignore zones of control. |
allow_teleport | Set to true to consider teleportation abilities. |
viewing_team | Usually the current team, except for "show enemy moves", etc. |
additional_turns | The number of turns to account for, in addition to the current. |
see_all | Set to true to remove unit visibility from consideration. |
ignore_units | Set to true if units should never obstruct paths (implies ignoring ZoC as well). |
Definition at line 528 of file pathfind.cpp.
References destinations, pathfind::find_routes(), unit::get_location(), movetype::get_movement(), unit::get_state(), int(), unit::movement_left(), unit::movement_type(), unit::side(), unit::STATE_SLOWED, resources::teams, teams, and unit::total_movement().
|
virtual |
Virtual destructor (default processing).
Virtual destructor to support child classes.
Definition at line 550 of file pathfind.cpp.
dest_vect pathfind::paths::destinations |
Definition at line 100 of file pathfind.hpp.
Referenced by can_see(), actions::shroud_clearer::clear_unit(), events::mouse_handler::current_unit_attacks_from(), ai::ai_default_rca::move_leader_to_goals_phase::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), game_display::highlight_another_reach(), game_lua_kernel::intf_find_reach(), pathfind::jamming_path::jamming_path(), ai::readonly_context_impl::leader_can_reach_keep(), events::mouse_handler::mouse_motion(), events::mouse_handler::move_action(), paths(), events::mouse_handler::select_hex(), events::mouse_handler::show_attack_options(), ai::readonly_context_impl::suitable_keep(), and pathfind::vision_path::vision_path().