Browse Source

Fix build

Ivan Savenko 2 years ago
parent
commit
ef94e7a78a
3 changed files with 5 additions and 5 deletions
  1. 1 2
      AI/BattleAI/BattleAI.cpp
  2. 3 3
      CCallback.h
  3. 1 0
      lib/battle/IBattleInfoCallback.h

+ 1 - 2
AI/BattleAI/BattleAI.cpp

@@ -52,8 +52,7 @@ void CBattleAI::initBattleInterface(std::shared_ptr<Environment> 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;

+ 3 - 3
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<const CPathsInfo> getPathsInfo(const CGHeroInstance * h);
+	virtual bool canMoveBetween(const int3 &a, const int3 &b);
+	virtual int3 getGuardingCreaturePosition(int3 tile);
+	virtual std::shared_ptr<const CPathsInfo> getPathsInfo(const CGHeroInstance * h);
 
 	std::optional<PlayerColor> getPlayerID() const override;
 

+ 1 - 0
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<PlayerColor> getPlayerID() const = 0;