mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +02:00
Fixes #809 - do not print error message after stepping onto mine
This commit is contained in:
parent
2e22b04c4a
commit
ced2ece954
@ -4639,12 +4639,12 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
|
|||||||
|
|
||||||
logGlobal->trace("%s will attack %s", stack->nodeName(), destinationStack->nodeName());
|
logGlobal->trace("%s will attack %s", stack->nodeName(), destinationStack->nodeName());
|
||||||
|
|
||||||
if(stack->getPosition() != attackPos //we wasn't able to reach destination tile
|
if(stack->getPosition() != attackPos
|
||||||
&& !(stack->doubleWide() && (stack->getPosition() == attackPos.cloneInDirection(stack->destShiftDir(), false))) //nor occupy specified hex
|
&& !(stack->doubleWide() && (stack->getPosition() == attackPos.cloneInDirection(stack->destShiftDir(), false)))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
complain("We cannot move this stack to its destination " + stack->getCreature()->namePl);
|
// we were not able to reach destination tile, nor occupy specified hex
|
||||||
ok = false;
|
// abort attack attempt, but treat this case as legal - we may have stepped onto a quicksands/mine
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user