mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-22 23:02:25 +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()) {
|
||||
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?
|
||||
|
||||
if (!process_timer.Check())
|
||||
return true;
|
||||
|
||||
ProcessSpawns(); // bit of a hack
|
||||
if (spawn_type != AuraSpawns::Noone)
|
||||
ProcessSpawns(); // bit of a hack
|
||||
|
||||
if (process_func)
|
||||
process_func(*this, owner);
|
||||
|
||||
@ -41,6 +41,7 @@ enum class AuraMovement {
|
||||
|
||||
class Aura : public NPC
|
||||
{
|
||||
// NOTE: We may have to override more virtual functions if they're causing issues
|
||||
public:
|
||||
Aura(NPCType *type_data, Mob *owner, AuraRecord &record);
|
||||
~Aura() { };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user