mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-28 19:52:29 +00:00
Limit position updates to those that care
This commit is contained in:
parent
da660b461f
commit
51c9cec35a
@ -583,14 +583,27 @@ bool Aura::Process()
|
|||||||
|
|
||||||
if (movement_type == AuraMovement::Follow && GetPosition() != owner->GetPosition() && movement_timer.Check()) {
|
if (movement_type == AuraMovement::Follow && GetPosition() != owner->GetPosition() && movement_timer.Check()) {
|
||||||
m_Position = owner->GetPosition();
|
m_Position = owner->GetPosition();
|
||||||
SendPositionUpdate();
|
auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
|
||||||
|
auto spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer;
|
||||||
|
MakeSpawnUpdate(spu);
|
||||||
|
auto it = spawned_for.begin();
|
||||||
|
while (it != spawned_for.end()) {
|
||||||
|
auto client = entity_list.GetClientByID(*it);
|
||||||
|
if (client) {
|
||||||
|
client->QueuePacket(app);
|
||||||
|
++it;
|
||||||
|
} else {
|
||||||
|
it = spawned_for.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// TODO: waypoints?
|
// TODO: waypoints?
|
||||||
|
|
||||||
if (!process_timer.Check())
|
if (!process_timer.Check())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
ProcessSpawns(); // bit of a hack
|
if (spawn_type != AuraSpawns::Noone)
|
||||||
|
ProcessSpawns(); // bit of a hack
|
||||||
|
|
||||||
if (process_func)
|
if (process_func)
|
||||||
process_func(*this, owner);
|
process_func(*this, owner);
|
||||||
|
|||||||
@ -41,6 +41,7 @@ enum class AuraMovement {
|
|||||||
|
|
||||||
class Aura : public NPC
|
class Aura : public NPC
|
||||||
{
|
{
|
||||||
|
// NOTE: We may have to override more virtual functions if they're causing issues
|
||||||
public:
|
public:
|
||||||
Aura(NPCType *type_data, Mob *owner, AuraRecord &record);
|
Aura(NPCType *type_data, Mob *owner, AuraRecord &record);
|
||||||
~Aura() { };
|
~Aura() { };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user