[Performance] Fixed a large overhead issue where every single NPC in a zone was checking to depop themselves

as a swarm pet every 3ms regardless of being a swarm pet or not. Swarm pets now check to depop only when their timer is up
This commit is contained in:
Akkadius
2017-03-28 02:30:06 -05:00
parent 4b6ce1c19e
commit bf45a5a44f
7 changed files with 86 additions and 73 deletions
+3 -1
View File
@@ -131,7 +131,9 @@ void Mob::SpellProcess()
void NPC::SpellProcess()
{
Mob::SpellProcess();
DepopSwarmPets();
if (swarm_timer.Check()) {
DepopSwarmPets();
}
}
///////////////////////////////////////////////////////////////////////////////