diff --git a/Source/monster.cpp b/Source/monster.cpp index 1966ddee2..07419016d 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -5420,4 +5420,16 @@ void MonsterStruct::Petrify() AnimInfo.IsPetrified = true; } +bool MonsterStruct::IsWalking() const +{ + switch (_mmode) { + case MM_WALK: + case MM_WALK2: + case MM_WALK3: + return true; + default: + return false; + } +} + } // namespace devilution diff --git a/Source/monster.h b/Source/monster.h index ce706b706..cdfb9545c 100644 --- a/Source/monster.h +++ b/Source/monster.h @@ -201,6 +201,11 @@ struct MonsterStruct { // note: missing field _mAFNum * @brief Sets _mmode to MM_STONE */ void Petrify(); + + /** + * @brief Is the monster currently walking? + */ + bool IsWalking() const; }; extern int monstkills[MAXMONSTERS];