The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
pathfind::emergency_path_calculator Struct Reference

Function which only uses terrain, ignoring shroud, enemies, etc. More...

#include <pathfind.hpp>

Inheritance diagram for pathfind::emergency_path_calculator:
Inheritance graph

Public Member Functions

 emergency_path_calculator (const unit &u, const gamemap &map)
 
virtual double cost (const map_location &loc, const double so_far) const
 
- Public Member Functions inherited from pathfind::cost_calculator
 cost_calculator ()
 
virtual ~cost_calculator ()
 

Private Attributes

unit const & unit_
 
gamemap const & map_
 

Additional Inherited Members

- Static Public Member Functions inherited from pathfind::cost_calculator
static double getNoPathValue ()
 

Detailed Description

Function which only uses terrain, ignoring shroud, enemies, etc.

Required by move_unit_fake if the normal path fails.

Definition at line 240 of file pathfind.hpp.

Constructor & Destructor Documentation

pathfind::emergency_path_calculator::emergency_path_calculator ( const unit u,
const gamemap map 
)

Definition at line 812 of file pathfind.cpp.

Member Function Documentation

double pathfind::emergency_path_calculator::cost ( const map_location loc,
const double  so_far 
) const
virtual

Implements pathfind::cost_calculator.

Definition at line 816 of file pathfind.cpp.

References map_, unit::movement_cost(), gamemap::on_board(), and unit_.

Member Data Documentation

gamemap const& pathfind::emergency_path_calculator::map_
private

Definition at line 247 of file pathfind.hpp.

Referenced by cost().

unit const& pathfind::emergency_path_calculator::unit_
private

Definition at line 246 of file pathfind.hpp.

Referenced by cost().


The documentation for this struct was generated from the following files: