Merge pull request #546 from noudess/master

Mobs that path and then despawn do so whether zone idle or active
This commit is contained in:
Akkadius 2016-08-26 14:26:50 -05:00 committed by GitHub
commit e84b2ba224
3 changed files with 18 additions and 6 deletions

View File

@ -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.

View File

@ -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

View File

@ -847,6 +847,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();