Browse Source

Fixes #809 - do not print error message after stepping onto mine

Ivan Savenko 2 years ago
parent
commit
ced2ece954
1 changed files with 4 additions and 4 deletions
  1. 4 4
      server/CGameHandler.cpp

+ 4 - 4
server/CGameHandler.cpp

@@ -4639,12 +4639,12 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
 
 			logGlobal->trace("%s will attack %s", stack->nodeName(), destinationStack->nodeName());
 
-			if(stack->getPosition() != attackPos //we wasn't able to reach destination tile
-				&& !(stack->doubleWide() && (stack->getPosition() == attackPos.cloneInDirection(stack->destShiftDir(), false))) //nor occupy specified hex
+			if(stack->getPosition() != attackPos
+				&& !(stack->doubleWide() && (stack->getPosition() == attackPos.cloneInDirection(stack->destShiftDir(), false)))
 				)
 			{
-				complain("We cannot move this stack to its destination " + stack->getCreature()->namePl);
-				ok = false;
+				// we were not able to reach destination tile, nor occupy specified hex
+				// abort attack attempt, but treat this case as legal - we may have stepped onto a quicksands/mine
 				break;
 			}