summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Horse.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-29 19:41:42 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-29 19:41:42 +0200
commitb0696ca6217bdcc72c22ae11f8993d3d36f1c129 (patch)
tree7be48a4c5d9a81b1a9da49ac98d9bb5d181541fa /src/Mobs/Horse.cpp
parentImplemented sheep, mooshroom, rabbit, chicken, pig, villager (diff)
downloadcuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.tar
cuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.tar.gz
cuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.tar.bz2
cuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.tar.lz
cuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.tar.xz
cuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.tar.zst
cuberite-b0696ca6217bdcc72c22ae11f8993d3d36f1c129.zip
Diffstat (limited to 'src/Mobs/Horse.cpp')
-rw-r--r--src/Mobs/Horse.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index 484864afe..247de9699 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -28,6 +28,10 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) :
m_MaxSpeed(14.0)
{
m_EMPersonality = PASSIVE;
+ m_BehaviorBreeder.AttachToMonster(*this);
+ m_BehaviorCoward.AttachToMonster(*this);
+ m_BehaviorItemFollower.AttachToMonster(*this);
+ m_BehaviorWanderer.AttachToMonster(*this);
}
@@ -193,3 +197,21 @@ void cHorse::HandleSpeedFromAttachee(float a_Forward, float a_Sideways)
super::HandleSpeedFromAttachee(a_Forward * m_MaxSpeed, a_Sideways * m_MaxSpeed);
}
}
+
+
+
+
+
+cBehaviorBreeder * cHorse::GetBehaviorBreeder()
+{
+ return &m_BehaviorBreeder;
+}
+
+
+
+
+
+const cBehaviorBreeder * cHorse::GetBehaviorBreeder() const
+{
+ return static_cast<const cBehaviorBreeder *>(&m_BehaviorBreeder);
+}