mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
#3842 - fix negative link cost because of bonuses
This commit is contained in:
parent
90fa1718a5
commit
f1d7151a93
@ -504,11 +504,11 @@ void ObjectGraph::connectHeroes(const Nullkiller * ai)
|
||||
auto heroPos = path.targetHero->visitablePos();
|
||||
|
||||
nodes[pos].connections[heroPos].update(
|
||||
path.movementCost(),
|
||||
std::max(0.0f, path.movementCost()),
|
||||
path.getPathDanger());
|
||||
|
||||
nodes[heroPos].connections[pos].update(
|
||||
path.movementCost(),
|
||||
std::max(0.0f, path.movementCost()),
|
||||
path.getPathDanger());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user