diff options
Diffstat (limited to 'src/Mobs/AggressiveMonster.cpp')
-rw-r--r-- | src/Mobs/AggressiveMonster.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp index 2cb59237c..1cb32fc70 100644 --- a/src/Mobs/AggressiveMonster.cpp +++ b/src/Mobs/AggressiveMonster.cpp @@ -13,10 +13,10 @@ cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height) : - super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_Width, a_Height), m_BehaviorAggressive(this) + super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_Width, a_Height), m_BehaviorAggressive(this) { - m_EMPersonality = AGGRESSIVE; - ASSERT(GetBehaviorChaser() != nullptr); + m_EMPersonality = AGGRESSIVE; + ASSERT(GetBehaviorChaser() != nullptr); } @@ -26,26 +26,26 @@ cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterTyp void cAggressiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { - super::Tick(a_Dt, a_Chunk); - - cBehaviorChaser * BehaviorChaser = GetBehaviorChaser(); - cBehaviorWanderer * BehaviorWanderer = GetBehaviorWanderer(); - - for (;;) - { - m_BehaviorAggressive.ActiveTick(); - if (BehaviorChaser->ActiveTick()) - { - break; - } - if ((BehaviorWanderer != nullptr) && BehaviorWanderer->ActiveTick(a_Dt, a_Chunk)) - { - break; - } - - ASSERT(!"Not a single Behavior took control, this is not normal. "); - break; - } - - BehaviorChaser->Tick(); + super::Tick(a_Dt, a_Chunk); + + cBehaviorChaser * BehaviorChaser = GetBehaviorChaser(); + cBehaviorWanderer * BehaviorWanderer = GetBehaviorWanderer(); + + for (;;) + { + m_BehaviorAggressive.Tick(); + if (BehaviorChaser->ActiveTick()) + { + break; + } + if ((BehaviorWanderer != nullptr) && BehaviorWanderer->ActiveTick(a_Dt, a_Chunk)) + { + break; + } + + ASSERT(!"Not a single Behavior took control, this is not normal. "); + break; + } + + BehaviorChaser->Tick(); } |