Fix combat_is_shot_blocked

This commit is contained in:
Alexander Batalov 2022-12-13 22:18:12 +03:00
parent 8333e553e2
commit 7596d4d721
1 changed files with 7 additions and 2 deletions

View File

@ -5919,8 +5919,13 @@ bool _combat_is_shot_blocked(Object* a1, int from, int to, Object* a4, int* a5)
} }
if ((obstacle->flags & OBJECT_MULTIHEX) != 0) { if ((obstacle->flags & OBJECT_MULTIHEX) != 0) {
int rotation = tileGetRotationTo(current, to); // SFALL: Fix obtaining the next tile from a multihex object.
current = tileGetTileInDirection(current, rotation, 1); // This bug does not cause any noticeable error in the function.
current = obstacle->tile;
if (current != to) {
int rotation = tileGetRotationTo(current, to);
current = tileGetTileInDirection(current, rotation, 1);
}
} else { } else {
current = obstacle->tile; current = obstacle->tile;
} }