From db380944ac0191f2ae5090f384354b1a7453230e Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 27 Aug 2016 00:46:45 -0500 Subject: [PATCH] Prevent horses (player mounts) from being depopped during a #repop --- zone/entity.cpp | 3 +++ zone/horse.cpp | 2 ++ zone/mob.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/zone/entity.cpp b/zone/entity.cpp index 08e1534c8..4eda2e75e 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2510,6 +2510,9 @@ void EntityList::Depop(bool StartSpawnTimer) if (own && own->IsClient()) continue; + if (pnpc->IsHorse) + continue; + if (pnpc->IsFindable()) UpdateFindableNPCState(pnpc, true); diff --git a/zone/horse.cpp b/zone/horse.cpp index a2cebcdc9..2d1f04f01 100644 --- a/zone/horse.cpp +++ b/zone/horse.cpp @@ -36,6 +36,8 @@ Horse::Horse(Client *_owner, uint16 spell_id, const glm::vec4& position) strn0cpy(name, _owner->GetCleanName(), 55); strcat(name,"`s_Mount00"); + is_horse = true; + owner = _owner; } diff --git a/zone/mob.h b/zone/mob.h index 22e4bf357..4c09dc200 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1405,6 +1405,8 @@ protected: std::unordered_map> aa_ranks; Timer aa_timers[aaTimerMax]; + bool is_horse; + private: void _StopSong(); //this is not what you think it is Mob* target;