1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Nullkiller: stabilization

This commit is contained in:
Andrii Danylchenko 2021-05-16 14:57:36 +03:00 committed by Andrii Danylchenko
parent f2c26d7553
commit 80df879489
3 changed files with 7 additions and 1 deletions

View File

@ -44,6 +44,9 @@ void DangerHitMapAnalyzer::updateHitMap()
for(auto pair : heroes)
{
if(ai->cb->getPlayerRelations(ai->playerID, pair.first) != PlayerRelations::ENEMIES)
continue;
ai->pathfinder->updatePaths(pair.second, PathfinderSettings());
boost::this_thread::interruption_point();

View File

@ -316,6 +316,9 @@ float RewardEvaluator::getStrategicalValue(const CGObjectInstance * target) cons
return target->subID == Res::GOLD ? 0 : 0.1f * getResourceRequirementStrength(target->subID);
case Obj::TOWN:
if(ai->buildAnalyzer->getDevelopmentInfo().empty())
return 1;
return dynamic_cast<const CGTownInstance *>(target)->hasFort()
? (target->tempOwner == PlayerColor::NEUTRAL ? 0.8f : 1.0f)
: 0.5f;

View File

@ -11,7 +11,7 @@
#pragma once
#define PATHFINDER_TRACE_LEVEL 0
#define AI_TRACE_LEVEL 2
#define AI_TRACE_LEVEL 0
#define SCOUT_TURN_DISTANCE_LIMIT 3
#include "../../../lib/CPathfinder.h"