summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAggressive.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-22 16:41:48 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-22 19:55:30 +0200
commit9711b06578e25fb92c8e6d10bd0f12bf593ed9db (patch)
treeb84d626e2216dc4010eef3060c950cc43c560e9e /src/Mobs/Behaviors/BehaviorAggressive.cpp
parentd (diff)
downloadcuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.tar
cuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.tar.gz
cuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.tar.bz2
cuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.tar.lz
cuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.tar.xz
cuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.tar.zst
cuberite-9711b06578e25fb92c8e6d10bd0f12bf593ed9db.zip
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorAggressive.cpp')
-rw-r--r--src/Mobs/Behaviors/BehaviorAggressive.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Mobs/Behaviors/BehaviorAggressive.cpp b/src/Mobs/Behaviors/BehaviorAggressive.cpp
index 74eee0e17..2113cb1e6 100644
--- a/src/Mobs/Behaviors/BehaviorAggressive.cpp
+++ b/src/Mobs/Behaviors/BehaviorAggressive.cpp
@@ -10,9 +10,9 @@
cBehaviorAggressive::cBehaviorAggressive(cMonster * a_Parent) : m_Parent(a_Parent)
{
- ASSERT(m_Parent != nullptr);
- m_ParentChaser = m_Parent->GetBehaviorChaser();
- ASSERT(m_ParentChaser != nullptr);
+ ASSERT(m_Parent != nullptr);
+ m_ParentChaser = m_Parent->GetBehaviorChaser();
+ ASSERT(m_ParentChaser != nullptr);
}
@@ -21,12 +21,12 @@ cBehaviorAggressive::cBehaviorAggressive(cMonster * a_Parent) : m_Parent(a_Paren
bool cBehaviorAggressive::ActiveTick()
{
- // Target something new if we have no target
- if (m_ParentChaser->GetTarget() == nullptr)
- {
- m_ParentChaser->SetTarget(FindNewTarget());
- }
- return false;
+ // Target something new if we have no target
+ if (m_ParentChaser->GetTarget() == nullptr)
+ {
+ m_ParentChaser->SetTarget(FindNewTarget());
+ }
+ return false;
}
@@ -35,15 +35,15 @@ bool cBehaviorAggressive::ActiveTick()
void cBehaviorAggressive::Destroyed()
{
- m_Target = nullptr;
+ m_Target = nullptr;
}
-bool cBehaviorAggressive::FindNewTarget()
+cPawn * cBehaviorAggressive::FindNewTarget()
{
- cPlayer * Closest = m_Parent->GetNearestPlayer();
- return Closest; // May be null
+ cPlayer * Closest = m_Parent->GetNearestPlayer();
+ return Closest; // May be null
}