1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

vcmi: add a last hex setting

I consider this behaviour as H3 bug, but this is H3.
So, added a setting to disable this behaviour.
This commit is contained in:
Konstantin
2023-03-27 02:29:20 +03:00
parent 35e8ce2ead
commit f704a17e1a
4 changed files with 12 additions and 2 deletions

View File

@@ -1559,7 +1559,13 @@ int CGameHandler::moveStack(int stack, BattleHex dest)
stackIsMoving = false;
}
}
//handle last hex separately for deviation
if (VLC->settings()->getBoolean(EGameSettings::COMBAT_ONE_HEX_TRIGGERS_OBSTACLES))
{
if (dest == battle::Unit::occupiedHex(start, curStack->doubleWide(), curStack->side)
|| start == battle::Unit::occupiedHex(dest, curStack->doubleWide(), curStack->side))
passed.clear(); //Just empty passed, obstacles will handled automatically
}
//handling obstacle on the final field (separate, because it affects both flying and walking stacks)
handleDamageFromObstacle(curStack, false, passed);