Mob position updates now completely only send to 600 units range defined by Range:MobPositionUpdates

Client updates nearby clients more often because they will disappear after 10 seconds without a position update to the client
This results in a massive reduction in unnecessary traffic as we only update clients of their relevance around them
This also resembles live-like packet sending behavior of positions
This commit is contained in:
Akkadius
2017-07-10 23:03:40 -05:00
parent dceb79ad69
commit ec00daa5be
7 changed files with 73 additions and 69 deletions
+1 -1
View File
@@ -370,7 +370,7 @@ public:
Mob* FindDefenseNPC(uint32 npcid);
void OpenDoorsNear(NPC* opener);
void UpdateWho(bool iSendFullUpdate = false);
void SendPositionUpdates(Client* client, uint32 cLastUpdate = 0, float range = 0, Entity* alwayssend = 0, bool iSendEvenIfNotChanged = false);
void SendPositionUpdates(Client* client, uint32 cLastUpdate = 0, float update_range = 0, Entity* always_send = 0, bool iSendEvenIfNotChanged = false);
char* MakeNameUnique(char* name);
static char* RemoveNumbers(char* name);
void SignalMobsByNPCID(uint32 npc_type, int signal_id);