comment a tiny unimportant pathfinding-cost error about ZoC at destination
(a bit sensible to change, it's possible that AI rely on it)
This commit is contained in:
parent
c7a29dcfd1
commit
25a3a25a42
1 changed files with 4 additions and 0 deletions
|
@ -329,6 +329,10 @@ double shortest_path_calculator::cost(const gamemap::location& /*src*/,const gam
|
|||
// since we sacrifice this turn's movement. Take that into account here.
|
||||
int additional_cost = base_cost > remaining_movement ? remaining_movement : 0;
|
||||
|
||||
// The isDist check is obsolete and introduce a little inaccurancy.
|
||||
// It comes trom the time when we returned getNoPathValue() in ZoC
|
||||
// But pathfinding calls with a small maximum path length
|
||||
// (like some AI stuff do) maybe rely on this.
|
||||
if (!isDst && enemy_zoc(map_,units_,teams_, loc, viewing_team_, unit_.side())
|
||||
&& !unit_.get_ability_bool("skirmisher", loc)) {
|
||||
// Should cost us remaining movement.
|
||||
|
|
Loading…
Add table
Reference in a new issue