瀏覽代碼

Fixes build warning in Potential Targets

Opuszek 1 月之前
父節點
當前提交
10a4a3adee
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      AI/BattleAI/PotentialTargets.cpp
  2. 1 1
      lib/battle/CBattleInfoCallback.h

+ 1 - 1
AI/BattleAI/PotentialTargets.cpp

@@ -23,7 +23,7 @@ PotentialTargets::PotentialTargets(
 
 	//FIXME: this should part of battleGetAvailableHexes
 	bool isBerserk = attackerInfo->hasBonusOfType(BonusType::ATTACKS_NEAREST_CREATURE);
-	ForcedAction forcedAction;
+	ForcedAction forcedAction = {};
 
 	if(isBerserk)
 		forcedAction = state->getBerserkForcedAction(attackerInfo);

+ 1 - 1
lib/battle/CBattleInfoCallback.h

@@ -53,7 +53,7 @@ struct DLL_LINKAGE BattleClientInterfaceData
 };
 
 struct ForcedAction {
-	EActionType type;
+	EActionType type = EActionType::NO_ACTION;
 	BattleHex position;
 	const battle::Unit * target;
 };