Skip to content

Commit 2d9b499

Browse files
committed
fix
1 parent 91d1f1d commit 2d9b499

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/mod/perf/sendprop_optimize.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,6 @@ namespace Mod::Perf::SendProp_Optimize
12841284

12851285
for (int i = 0; i < packWorkTaskCount; i++) {
12861286
threadPoolPackWork.push_task([&](int num){
1287-
entitiesWithNotUpdatedChangedProps[num].reserve(8);
1288-
entitiesWithNotUpdatedFullyChangedProps[num].reserve(2);
12891287
size_t workEntryCount = snapshot->m_nValidEntities/packWorkTaskCount+1;
12901288
PackWork_t *workEntities = (PackWork_t *) operator new[](workEntryCount * sizeof(PackWork_t));
12911289
size_t workEntitiesCount = 0;
@@ -1297,9 +1295,9 @@ namespace Mod::Perf::SendProp_Optimize
12971295
&& snapmgr.UsePreviouslySentPacket(snapshot, idx, edict->m_NetworkSerialNumber)) {
12981296

12991297
if (edict->m_fStateFlags & FL_FULL_EDICT_CHANGED)
1300-
entitiesWithNotUpdatedFullyChangedProps->push_back(edict);
1298+
entitiesWithNotUpdatedFullyChangedProps[num].push_back(edict);
13011299
else if (edict->m_fStateFlags & FL_EDICT_CHANGED)
1302-
entitiesWithNotUpdatedChangedProps->push_back(edict);
1300+
entitiesWithNotUpdatedChangedProps[num].push_back(edict);
13031301
continue;
13041302
}
13051303
PackWork_t &work = workEntities[workEntitiesCount++];
@@ -1374,6 +1372,9 @@ namespace Mod::Perf::SendProp_Optimize
13741372
}
13751373
}
13761374

1375+
delete entitiesWithNotUpdatedChangedProps;
1376+
delete entitiesWithNotUpdatedFullyChangedProps;
1377+
13771378
threadPool.wait_for_tasks();
13781379
threadPoolPackWork.wait_for_tasks();
13791380

0 commit comments

Comments
 (0)