Browse Source

Merge pull request #5031 from dydzio0614/empty-hexes-shoot-fix

Fix shooting being priority action for dead creature hexes with empty hex target enabled
Ivan Savenko 1 year ago
parent
commit
7a75aafc88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/battle/BattleActionsController.cpp

+ 1 - 1
client/battle/BattleActionsController.cpp

@@ -275,7 +275,7 @@ void BattleActionsController::reorderPossibleActionsPriority(const CStack * stac
 				return 2;
 				break;
 			case PossiblePlayerBattleAction::SHOOT:
-				if(targetStack == nullptr || targetStack->unitSide() == stack->unitSide())
+				if(targetStack == nullptr || targetStack->unitSide() == stack->unitSide() || !targetStack->alive())
 					return 100; //bottom priority
 
 				return 4;