diff --git a/CEconomy.cpp b/CEconomy.cpp index 8c56b21..edb8d50 100644 --- a/CEconomy.cpp +++ b/CEconomy.cpp @@ -1065,23 +1065,20 @@ void CEconomy::tryBuildingDefense(CGroup* group) { if (mstall || estall) return; - //bool allow; - int size; - float k; unitCategory incCats, excCats; buildType bt; - CCoverageCell::NType layer; +// CCoverageCell::NType layer; if (ai->intel->getEnemyCount(AIR) > 0 && rng.RandFloat() > 0.66f) { bt = BUILD_AA_DEFENSE; - layer = CCoverageCell::DEFENSE_ANTIAIR; +// layer = CCoverageCell::DEFENSE_ANTIAIR; // TODO: replace STATIC with DEFENSE after all config files updated incCats = STATIC|ANTIAIR; excCats = TORPEDO; } else if (ai->gamemap->IsWaterMap() && rng.RandFloat() > 0.5f) { bt = BUILD_UW_DEFENSE; - layer = CCoverageCell::DEFENSE_UNDERWATER; +// layer = CCoverageCell::DEFENSE_UNDERWATER; // TODO: replace STATIC with DEFENSE after all config files updated incCats = STATIC|TORPEDO; // NOTE: we do not support coastal torpedo launchers @@ -1090,15 +1087,17 @@ void CEconomy::tryBuildingDefense(CGroup* group) { else { bt = BUILD_AG_DEFENSE; - layer = CCoverageCell::DEFENSE_GROUND; +// layer = CCoverageCell::DEFENSE_GROUND; incCats = ATTACKER|DEFENSE; excCats = ANTIAIR|TORPEDO; } - size = ai->coverage->getLayerSize(layer); - k = size / (ai->unittable->staticUnits.size() - size + 1.0f); +/* + int size = ai->coverage->getLayerSize(layer); + const float k = size / (ai->unittable->staticUnits.size() - size + 1.0f); + bool allow; -/* switch (ai->difficulty) { + switch (ai->difficulty) { case DIFFICULTY_EASY: allow = k < 0.11f; break; @@ -1108,7 +1107,8 @@ void CEconomy::tryBuildingDefense(CGroup* group) { case DIFFICULTY_HARD: allow = k < 0.51f; break; - }*/ + } +*/ buildOrAssist(*group, bt, incCats, excCats); } diff --git a/CMakeLists.txt b/CMakeLists.txt index 690f611..50e88b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ ### Generic native Skirmish AI config # set(mySourceDirRel "") # Common values are "" or "src" -set(additionalSources ${CUtils_SRC}) +set(additionalSources "") set(additionalCompileFlags "") -set(additionalLibraries ${LegacyCpp_AIWRAPPER_TARGET} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +set(additionalLibraries ${LegacyCpp_AIWRAPPER_TARGET} CUtils ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY}) ConfigureNativeSkirmishAI(mySourceDirRel additionalSources additionalCompileFlags additionalLibraries) diff --git a/headers/Defines.h b/headers/Defines.h index c2aeba8..437c08c 100644 --- a/headers/Defines.h +++ b/headers/Defines.h @@ -16,7 +16,7 @@ /* AI meta data */ #define AI_VERSION_NR aiexport_getVersion() #define AI_NAME std::string("E323AI") -#define AI_VERSION AI_NAME + " " + AI_VERSION_NR + " - High Templar (" + __DATE__ + ")" +#define AI_VERSION AI_NAME + " " + AI_VERSION_NR + " - High Templar" #define AI_CREDITS "Error323 & Simon Logic" #define AI_NOTES "This A.I. mainly focusses on the XTA and BA mods"