|
@@ -8257,9 +8257,11 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
|
|
|
int32 vis_size = 0;
|
|
|
|
|
|
int count = 0;
|
|
|
+ bool forceSend = false;
|
|
|
for (const auto& spawn : spawns) {
|
|
|
- if (count > 20 || (info_size+pos_size+vis_size) > 200)
|
|
|
+ if (forceSend || count > 9 || (info_size+pos_size+vis_size) > 200)
|
|
|
{
|
|
|
+ forceSend = false;
|
|
|
MakeSpawnChangePacket(info_changes, pos_changes, vis_changes, info_size, pos_size, vis_size);
|
|
|
|
|
|
for (auto& kv : info_changes) {
|
|
@@ -8295,6 +8297,7 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
|
|
|
info_size += spawn->info_packet_size;
|
|
|
|
|
|
info_changes[index] = data;
|
|
|
+ forceSend = true;
|
|
|
}
|
|
|
count++;
|
|
|
}
|
|
@@ -8325,6 +8328,7 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
|
|
|
vis_size += spawn->vis_packet_size;
|
|
|
|
|
|
vis_changes[index] = data;
|
|
|
+ forceSend = true;
|
|
|
}
|
|
|
count++;
|
|
|
}
|