Uleat, I think I understand what you are asking, but want to make sure... This is the code in entity.cpp for void EntityList::CheckSpawnQueue(). I want to confirm, you want me to replace this code with the code you included above?
Code:
void EntityList::CheckSpawnQueue()
{
// Send the stuff if the oldest packet on the queue is older than 50ms -Quagmire
if (tsFirstSpawnOnQueue != 0xFFFFFFFF && (Timer::GetCurrentTime() - tsFirstSpawnOnQueue) > 50) {
LinkedListIterator<NewSpawn_Struct *> iterator(SpawnQueue);
EQApplicationPacket *outapp = 0;
iterator.Reset();
NewSpawn_Struct *ns;
while(iterator.MoreElements()) {
outapp = new EQApplicationPacket;
ns = iterator.GetData();
Mob::CreateSpawnPacket(outapp, ns);
QueueClients(0, outapp);
auto it = npc_list.find(ns->spawn.spawnId);
NPC *pnpc = it->second;
pnpc->SendArmorAppearance();
pnpc->SetAppearance(pnpc->GetGuardPointAnim(),false);
safe_delete(outapp);
iterator.RemoveCurrent();
}
tsFirstSpawnOnQueue = 0xFFFFFFFF;
NumSpawnsOnQueue = 0;
}
}