From ecdc0f709609f88b41f965cafd832e477994ac11 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Tue, 23 Aug 2016 13:54:51 -0400 Subject: [PATCH 1/2] Fixed so mobs that depop at end of pathgrid still path and depop whiel zones are empty. This makes these mobs no longer always appear at start locations for the 1st person in a zone after long idle. --- zone/entity.cpp | 16 ++++++++++------ zone/mob.h | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index d398c9bf6..975b793e9 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -478,14 +478,18 @@ void EntityList::MobProcess() size_t sz = mob_list.size(); #ifdef IDLE_WHEN_EMPTY - // spawn_events can cause spawns and deaths while zone empty. - // At the very least, process that. - if (numclients < 1) { - mob_dead = mob->CastToNPC()->GetDepop(); - } - else { + if (numclients > 0 || + mob->GetWanderType() == 4 || mob->GetWanderType() == 6) { + // Normal processing, or assuring that spawns that should + // path and depop do that. Otherwise all of these type mobs + // will be up and at starting positions when idle zone wakes up. mob_dead = !mob->Process(); } + else { + // spawn_events can cause spawns and deaths while zone empty. + // At the very least, process that. + mob_dead = mob->CastToNPC()->GetDepop(); + } #else mob_dead = !mob->Process(); #endif diff --git a/zone/mob.h b/zone/mob.h index 3106df4ff..ff4879edd 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -843,6 +843,7 @@ public: inline void SetFocused(bool nState) { focused = nState; } inline const bool IsFocused() const { return focused; } inline const bool IsRoamer() const { return roamer; } + inline const int GetWanderType() const { return wandertype; } inline const bool IsRooted() const { return rooted || permarooted; } inline const bool HasVirus() const { return has_virus; } int GetSnaredAmount(); From 5039aa07a5a5cbf89b212df44375682247f189d9 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Tue, 23 Aug 2016 14:50:29 -0400 Subject: [PATCH 2/2] updated changelog --- changelog.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.txt b/changelog.txt index 7647ea8ec..cde46e646 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 08/23/2016 == +noudess: Force mobs on a depop @ end pathgrid to still do this on idle zones. +This makes them be more random after a zone is idle, rather than always showing +up at start point when 1st person logs into an idle zone. Much more like live. +I dion't think this will be much of a performance problem. Once they path and +depop, no mkore cpu usage. + == 08/14/2016 == mackal: Implement Linked Spell Reuse Timers - For whatever reason this is a bit unfriendly, but that's how it is on live.