1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Enum for PriorityTiers

In order to not confuse PriorityTiers, especially after adding new ones, now using an enum to identify them.
This commit is contained in:
Xilmi
2024-09-02 00:16:19 +02:00
parent c667ca46d1
commit 09badeb5be
4 changed files with 24 additions and 13 deletions

View File

@@ -467,7 +467,7 @@ void ObjectClusterizer::clusterizeObject(
heroesProcessed.insert(path.targetHero);
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)), 5);
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)), PriorityEvaluator::PriorityTier::HUNTER_GATHER);
if(ai->settings->isUseFuzzy() && priority < MIN_PRIORITY)
continue;
@@ -490,7 +490,7 @@ void ObjectClusterizer::clusterizeObject(
heroesProcessed.insert(path.targetHero);
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)), 5);
float priority = priorityEvaluator->evaluate(Goals::sptr(Goals::ExecuteHeroChain(path, obj)), PriorityEvaluator::PriorityTier::HUNTER_GATHER);
if (ai->settings->isUseFuzzy() && priority < MIN_PRIORITY)
continue;