diff --git a/src/shared/NSMonster.h b/src/shared/NSMonster.h index 598f3917..acdc0b63 100644 --- a/src/shared/NSMonster.h +++ b/src/shared/NSMonster.h @@ -596,6 +596,7 @@ private: float m_flLeapDamage; bool m_bLeapAttacked; + float m_flForceSequence; nonvirtual void _LerpTurnToEnemy(void); nonvirtual void _LerpTurnToPos(vector); diff --git a/src/shared/NSMonster.qc b/src/shared/NSMonster.qc index 2fe32020..a3adada1 100644 --- a/src/shared/NSMonster.qc +++ b/src/shared/NSMonster.qc @@ -1476,6 +1476,15 @@ NSMonster::Physics(void) if (!IsAlive) return; + if (m_flForceSequence) { + if (m_iSequenceState != SEQUENCESTATE_IDLE) { + SetFrame(m_flForceSequence); + } + m_flAnimTime = time + 999.0f; + frame = m_flForceSequence; + m_iSequenceState = SEQUENCESTATE_IDLE; + } + /* unset the leap attack */ if (m_bLeapAttacked == true && HasFlags(FL_ONGROUND) == true) { m_bLeapAttacked = false; @@ -2037,6 +2046,9 @@ NSMonster::SpawnKey(string strKey, string strValue) case "frame": _m_flFrame = ReadFloat(strValue); break; + case "sequence": + m_flForceSequence = ReadFloat(strValue); + break; default: super::SpawnKey(strKey, strValue); break;