Clear stale special action before assigning battle node action

Battle nodes may be reused or updated without receiving a new special action
from the destination node. Reset specialAction first so stale actions from a
previous node state are not accidentally preserved.

This keeps generated battle paths from executing unrelated special actions.
This commit is contained in:
Michał Zaremba
2026-05-17 14:56:55 +02:00
parent 4f78f67d8f
commit b54a18a031
@@ -331,6 +331,8 @@ namespace AIPathfinding
if(loss < actualArmyValue)
{
battleNode->specialAction = nullptr;
if(destNode->specialAction)
{
battleNode->specialAction = destNode->specialAction;