diff options
Diffstat (limited to 'src/Mobs/Horse.cpp')
-rw-r--r-- | src/Mobs/Horse.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp index 13630b0e3..c3d805b69 100644 --- a/src/Mobs/Horse.cpp +++ b/src/Mobs/Horse.cpp @@ -11,7 +11,7 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : - super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", 1.4, 1.6), + super(mtHorse, "entity.horse.hurt", "entity.horse.death", 1.4, 1.6), m_bHasChest(false), m_bIsEating(false), m_bIsRearing(false), @@ -27,6 +27,12 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : m_RearTickCount(0), m_MaxSpeed(14.0) { + m_EMPersonality = PASSIVE; + m_BehaviorBreeder.AttachToMonster(*this); + m_BehaviorCoward.AttachToMonster(*this); + m_BehaviorItemFollower.AttachToMonster(*this); + m_BehaviorWanderer.AttachToMonster(*this); + GetMonsterConfig("Horse"); } @@ -185,19 +191,6 @@ void cHorse::GetDrops(cItems & a_Drops, cEntity * a_Killer) -void cHorse::InStateIdle(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) -{ - // If horse is tame and someone is sitting on it, don't walk around - if ((!m_bIsTame) || (m_Attachee == nullptr)) - { - super::InStateIdle(a_Dt, a_Chunk); - } -} - - - - - void cHorse::HandleSpeedFromAttachee(float a_Forward, float a_Sideways) { if ((m_bIsTame) && (m_bIsSaddled)) |