From 35d35120d2ea29945d09e46b4d52173554fd7fa1 Mon Sep 17 00:00:00 2001 From: Samuel Holgersson Date: Tue, 23 Jul 2024 13:30:53 +0200 Subject: [PATCH] Small fixes --- CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp | 2 +- CvGameCoreDLL_Expansion2/CvTacticalAI.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp b/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp index 21b993dd41..012f932b4b 100644 --- a/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp +++ b/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp @@ -3293,7 +3293,7 @@ pair CvBuilderTaskingAI::ScorePlotBuild(CvPlot* pPlot, ImprovementTypes // Don't build on antiquity sites if (eResource != NO_RESOURCE && eBuild != NO_BUILD) { - BuildTypes eDigBuild = (BuildTypes)GC.getInfoTypeForString("BUILD_ARCHAEOLOGY_DIG"); + static const BuildTypes eDigBuild = (BuildTypes)GC.getInfoTypeForString("BUILD_ARCHAEOLOGY_DIG"); if (m_pPlayer->canBuild(pPlot, eDigBuild) && eDigBuild != eBuild) iSecondaryScore -= 1000; } diff --git a/CvGameCoreDLL_Expansion2/CvTacticalAI.cpp b/CvGameCoreDLL_Expansion2/CvTacticalAI.cpp index f250b537f0..dcca03a5e4 100644 --- a/CvGameCoreDLL_Expansion2/CvTacticalAI.cpp +++ b/CvGameCoreDLL_Expansion2/CvTacticalAI.cpp @@ -2186,7 +2186,7 @@ void CvTacticalAI::PlotReinforcementMoves(CvTacticalDominanceZone* pTargetZone) // we want units which are somewhat close (so we don't deplete other combat zones) // do not set a player - that way we can traverse unrevealed plots and foreign territory SPathFinderUserData data(NO_PLAYER, PT_ARMY_MIXED, NO_PLAYER, GetRecruitRange()); - CvPlot* pTargetPlot = pTargetZone->GetZoneCity()->plot(); + CvPlot* pTargetPlot = pZoneCity->plot(); ReachablePlots relevantPlots = GC.GetStepFinder().GetPlotsInReach(pTargetPlot, data);