From 9623f7caf385bc447ba5ab696a6bff0297860ae4 Mon Sep 17 00:00:00 2001 From: DJWarmonger Date: Sun, 11 Jun 2017 08:01:41 +0200 Subject: [PATCH] - Restored MSVS project files - Fixed VCAI bu pointed out by Tow --- AI/VCAI/VCAI.cpp | 13 +++++-------- client/VCMI_client.vcxproj | 4 ++-- client/gui/CAnimation.h | 2 +- client/gui/CCursorHandler.cpp | 2 +- lib/VCMI_lib.vcxproj | 5 +++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index 448ad87f4..c6ccf916b 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -2341,22 +2341,19 @@ Goals::TSubgoal VCAI::striveToGoalInternal(Goals::TSubgoal ultimateGoal, bool on { boost::this_thread::interruption_point(); - if (!maxGoals) + if (!maxGoals) //we counted down to 0 and found no solution { + if (ultimateGoal->hero) // we seemingly don't know what to do with hero, free him + vstd::erase_if_present(lockedHeroes, ultimateGoal->hero); std::runtime_error e("Too many subgoals, don't know what to do"); throw (e); } - - if (goal->hero) //lock this hero to fulfill ultimate goal + else //we can proceed { - if (maxGoals) + if (goal->hero) //lock this hero to fulfill ultimate goal { setGoal(goal->hero, goal); } - else - { - vstd::erase_if_present (lockedHeroes, goal->hero); // we seemingly don't know what to do with hero - } } if (goal->isAbstract) diff --git a/client/VCMI_client.vcxproj b/client/VCMI_client.vcxproj index 9d0476656..960d67356 100644 --- a/client/VCMI_client.vcxproj +++ b/client/VCMI_client.vcxproj @@ -107,7 +107,7 @@ Use StdInc.h /MP4 /Zm150 - $(FFMPEGDIR)\include;. + $(FFMPEGDIR);$(SDLDIR);$(BOOSTDIR);$(AdditionalIncludeDirectories) avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;postproc.lib;swresample.lib;swscale.lib;SDL.lib;zlib.lib;SDL_image.lib;SDL_ttf.lib;SDL_mixer.lib;VCMI_lib.lib;%(AdditionalDependencies) @@ -145,7 +145,7 @@ Use StdInc.h /MP4 /Zm150 - $(FFMPEGDIR)\include;.; + $(FFMPEGDIR);$(SDLDIR);$(BOOSTDIR);$(AdditionalIncludeDirectories) avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;postproc.lib;swresample.lib;swscale.lib;zlib.lib;SDL2.lib;SDL2main.lib;VCMI_lib.lib;SDL2_mixer.lib;SDL2_image.lib;SDL2_ttf.lib;%(AdditionalDependencies) diff --git a/client/gui/CAnimation.h b/client/gui/CAnimation.h index 0e71a51a8..83a7be91f 100644 --- a/client/gui/CAnimation.h +++ b/client/gui/CAnimation.h @@ -1,7 +1,7 @@ #pragma once #include "../../lib/vcmi_endian.h" -#include "gui/Geometries.h" +#include "Geometries.h" #include "../../lib/GameConstants.h" /* diff --git a/client/gui/CCursorHandler.cpp b/client/gui/CCursorHandler.cpp index 326a8a743..96b2bb377 100644 --- a/client/gui/CCursorHandler.cpp +++ b/client/gui/CCursorHandler.cpp @@ -5,7 +5,7 @@ #include "SDL_Extensions.h" #include "CGuiHandler.h" -#include "widgets/Images.h" +#include "../widgets/Images.h" #include "../CMT.h" diff --git a/lib/VCMI_lib.vcxproj b/lib/VCMI_lib.vcxproj index e2aff1646..452ef69ad 100644 --- a/lib/VCMI_lib.vcxproj +++ b/lib/VCMI_lib.vcxproj @@ -98,7 +98,7 @@ /MP4 %(AdditionalOptions) /bigobj /Zm150 Disabled - D:\VCMI\include\boost;D:\VCMI\include;%(AdditionalIncludeDirectories) + $(BOOSTDIR); $(ZLIBDIR);$(SDLDIR) false EnableFastChecks MultiThreadedDebugDLL @@ -139,6 +139,7 @@ VCMI_DLL;VCMI_NO_EXTRA_VERSION;%(PreprocessorDefinitions) StdInc.h Use + $(BOOSTDIR); $(ZLIBDIR);$(SDLDIR) minizip.lib;zlib.lib;%(AdditionalDependencies) @@ -424,4 +425,4 @@ - + \ No newline at end of file