From ef94e7a78a9982032f187a9fb29c183188ab637d Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Thu, 31 Aug 2023 19:09:28 +0300 Subject: [PATCH] Fix build --- AI/BattleAI/BattleAI.cpp | 3 +-- CCallback.h | 6 +++--- lib/battle/IBattleInfoCallback.h | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AI/BattleAI/BattleAI.cpp b/AI/BattleAI/BattleAI.cpp index b94a56513..73a133467 100644 --- a/AI/BattleAI/BattleAI.cpp +++ b/AI/BattleAI/BattleAI.cpp @@ -52,8 +52,7 @@ void CBattleAI::initBattleInterface(std::shared_ptr ENV, std::share setCbc(CB); env = ENV; cb = CB; - assert(0);// FIXME: - // playerID = *CB->getPlayerID(); //TODO should be sth in callback + playerID = *CB->getPlayerID(); wasWaitingForRealize = CB->waitTillRealize; wasUnlockingGs = CB->unlockGsWhenWaiting; CB->waitTillRealize = false; diff --git a/CCallback.h b/CCallback.h index 8acb0d6c5..3657e3581 100644 --- a/CCallback.h +++ b/CCallback.h @@ -145,9 +145,9 @@ public: virtual ~CCallback(); //client-specific functionalities (pathfinding) - bool canMoveBetween(const int3 &a, const int3 &b); - int3 getGuardingCreaturePosition(int3 tile); - std::shared_ptr getPathsInfo(const CGHeroInstance * h); + virtual bool canMoveBetween(const int3 &a, const int3 &b); + virtual int3 getGuardingCreaturePosition(int3 tile); + virtual std::shared_ptr getPathsInfo(const CGHeroInstance * h); std::optional getPlayerID() const override; diff --git a/lib/battle/IBattleInfoCallback.h b/lib/battle/IBattleInfoCallback.h index d216bf454..5996d5bda 100644 --- a/lib/battle/IBattleInfoCallback.h +++ b/lib/battle/IBattleInfoCallback.h @@ -56,6 +56,7 @@ public: #if SCRIPTING_ENABLED virtual scripting::Pool * getContextPool() const = 0; #endif + virtual ~IBattleInfoCallback() = default; virtual const IBattleInfo * getBattle() const = 0; virtual std::optional getPlayerID() const = 0;