The Battle for Wesnoth  1.19.7+dev
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:

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

const unitunit_
 
const gamemapmap_
 

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 241 of file pathfind.hpp.

Constructor & Destructor Documentation

◆ emergency_path_calculator()

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

Definition at line 857 of file pathfind.cpp.

Member Function Documentation

◆ cost()

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

Implements pathfind::cost_calculator.

Definition at line 861 of file pathfind.cpp.

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

Member Data Documentation

◆ map_

const gamemap& pathfind::emergency_path_calculator::map_
private

Definition at line 248 of file pathfind.hpp.

Referenced by cost().

◆ unit_

const unit& pathfind::emergency_path_calculator::unit_
private

Definition at line 247 of file pathfind.hpp.

Referenced by cost().


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