mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-14 10:12:59 +02:00
Update DefenceBehavior.cpp
Reverted previous change to defense-behavior. Both approaches have pros and cons and neither really works as I want. This still needs work.
This commit is contained in:
parent
ed059393ec
commit
fba34a743e
@ -158,6 +158,10 @@ void DefenceBehavior::evaluateDefence(Goals::TGoalVec & tasks, const CGTownInsta
|
|||||||
|
|
||||||
threats.push_back(threatNode.fastestDanger); // no guarantee that fastest danger will be there
|
threats.push_back(threatNode.fastestDanger); // no guarantee that fastest danger will be there
|
||||||
|
|
||||||
|
if (town->garrisonHero && handleGarrisonHeroFromPreviousTurn(town, tasks, ai))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!threatNode.fastestDanger.hero)
|
if(!threatNode.fastestDanger.hero)
|
||||||
{
|
{
|
||||||
logAi->trace("No threat found for town %s", town->getNameTranslated());
|
logAi->trace("No threat found for town %s", town->getNameTranslated());
|
||||||
|
Loading…
Reference in New Issue
Block a user