|
@@ -186,7 +186,7 @@ void AINodeStorage::commit(
|
|
int movementLeft,
|
|
int movementLeft,
|
|
float cost) const
|
|
float cost) const
|
|
{
|
|
{
|
|
- destination->action = source->action;
|
|
|
|
|
|
+ destination->action = action;
|
|
destination->cost = cost;
|
|
destination->cost = cost;
|
|
destination->moveRemains = movementLeft;
|
|
destination->moveRemains = movementLeft;
|
|
destination->turns = turn;
|
|
destination->turns = turn;
|
|
@@ -322,9 +322,9 @@ void AINodeStorage::commitExchange(
|
|
#ifdef VCMI_TRACE_PATHFINDER
|
|
#ifdef VCMI_TRACE_PATHFINDER
|
|
logAi->trace(
|
|
logAi->trace(
|
|
"Accepted hero exhange at %s, carrier %s, mp cost %f",
|
|
"Accepted hero exhange at %s, carrier %s, mp cost %f",
|
|
- destination.coord.toString(),
|
|
|
|
|
|
+ exchangeNode->coord.toString(),
|
|
carrierActor->hero->name,
|
|
carrierActor->hero->name,
|
|
- destination.cost);
|
|
|
|
|
|
+ cost);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
commit(exchangeNode, carrierParentNode, carrierParentNode->action, turns, movementLeft, cost);
|
|
commit(exchangeNode, carrierParentNode, carrierParentNode->action, turns, movementLeft, cost);
|