♻️ Leverage 'IsWalking' function for monster walking checks

This commit is contained in:
Juliano Leal Goncalves 2021-09-01 00:27:34 -03:00 committed by Anders Jenbo
commit 314ae59828
2 changed files with 2 additions and 2 deletions

View file

@ -4189,7 +4189,7 @@ void GolumAi(int i)
if (golem._mmode == MM_DEATH
|| golem._mmode == MM_SPSTAND
|| (golem._mmode >= MM_WALK && golem._mmode <= MM_WALK3)) {
|| golem.IsWalking()) {
return;
}

View file

@ -172,7 +172,7 @@ void SyncMonster(int pnum, const TSyncMonster *p)
}
if (monster.position.tile.WalkingDistance({ p->_mx, p->_my }) <= 2) {
if (monster._mmode < MM_WALK || monster._mmode > MM_WALK3) {
if (!monster.IsWalking()) {
Direction md = GetDirection(monster.position.tile, { p->_mx, p->_my });
if (DirOK(ndx, md)) {
M_ClearSquares(ndx);