瀏覽代碼

Fixed crash when unit dies by entering obstacle (eg. moat) on the way to perform attack.

Michał W. Urbańczyk 13 年之前
父節點
當前提交
3de9b71cc3
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      server/CGameHandler.cpp

+ 1 - 0
server/CGameHandler.cpp

@@ -3404,6 +3404,7 @@ bool CGameHandler::makeBattleAction( BattleAction &ba )
 			}
 
 			//attack
+			if(stack->alive()) //move can cause death, eg. by walking into the moat
 			{
 				BattleAttack bat;
 				prepareAttack(bat, stack, stackAtEnd, distance, ba.additionalInfo);