diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 2a1816348..f2e8b5620 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -1342,7 +1342,7 @@ void AddBerserk(MissileStruct &missile, Point dst, Direction /*midir*/) if (monster._uniqtype != 0 || monster._mAi == AI_DIABLO) continue; - if (monster._mmode == MonsterMode::FadeIn || monster._mmode == MonsterMode::FadeOut) + if (IsAnyOf(monster._mmode, MonsterMode::FadeIn, MonsterMode::FadeOut)) continue; if ((monster.mMagicRes & IMMUNE_MAGIC) != 0) continue; diff --git a/Source/monster.cpp b/Source/monster.cpp index d5b924796..f90aa6636 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -4187,9 +4187,7 @@ void GolumAi(int i) return; } - if (golem._mmode == MonsterMode::Death - || golem._mmode == MonsterMode::SpecialStand - || golem.IsWalking()) { + if (IsAnyOf(golem._mmode, MonsterMode::Death, MonsterMode::SpecialStand) || golem.IsWalking()) { return; } @@ -5006,7 +5004,7 @@ void decode_enemy(MonsterStruct &monster, int enemy) void MonsterStruct::CheckStandAnimationIsLoaded(Direction mdir) { - if (_mmode == MonsterMode::Stand || _mmode == MonsterMode::Talk) { + if (IsAnyOf(_mmode, MonsterMode::Stand, MonsterMode::Talk)) { _mdir = mdir; AnimInfo.pCelSprite = &*MType->GetAnimData(MonsterGraphic::Stand).CelSpritesForDirections[mdir]; } diff --git a/Source/sync.cpp b/Source/sync.cpp index 3fd38173d..6456cec6a 100644 --- a/Source/sync.cpp +++ b/Source/sync.cpp @@ -167,7 +167,7 @@ void SyncMonster(int pnum, const TSyncMonster *p) if (monster.position.future.x == p->_mx && monster.position.future.y == p->_my) { return; } - if (monster._mmode == MonsterMode::Charge || monster._mmode == MonsterMode::Petrified) { + if (IsAnyOf(monster._mmode, MonsterMode::Charge, MonsterMode::Petrified)) { return; }