♻️ Leverage 'IsWalking' function for monster walking checks
This commit is contained in:
parent
5a9dd86e80
commit
314ae59828
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue