浏览代码

Silence "X doesn't have a base stack!" warning

AlexVinS 9 年之前
父节点
当前提交
6d13c8938c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/BattleState.h

+ 2 - 0
lib/BattleState.h

@@ -271,6 +271,8 @@ public:
 				assert (hero);
 				base = hero->commander;
 			}
+			else if(slot == SlotID::WAR_MACHINES_SLOT || slot == SlotID::ARROW_TOWERS_SLOT)
+				base = nullptr;
 			else if(!army || slot == SlotID() || !army->hasStackAtSlot(slot))
 			{
 				base = nullptr;