View Single Post
  #8  
Old 05-15-2015, 08:23 PM
Riklin
Hill Giant
 
Join Date: May 2003
Location: Tacoma, WA
Posts: 229
Default

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;
	}
}
Reply With Quote