Browse Source

Introduce MonsterStruct.IsWalking()

pull/2229/head
obligaron 5 years ago committed by Anders Jenbo
parent
commit
cada4a5ac4
  1. 12
      Source/monster.cpp
  2. 5
      Source/monster.h

12
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

5
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];

Loading…
Cancel
Save