MCPcopy Create free account
hub / github.com/Norbyte/bg3se / DebugLogReplicationChanges

Method DebugLogReplicationChanges

BG3Extender/GameDefinitions/EntitySystem.cpp:1318–1343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1316}
1317
1318void EntitySystemHelpersBase::DebugLogReplicationChanges()
1319{
1320 auto world = GetEntityWorld();
1321 if (!logging_) return;
1322
1323 ecs::SyncBuffers* buffers = world->Replication;
1324 if (!buffers) {
1325 buffers = *GetStaticSymbols().GetEoCClient()->GameClient->ReplicationPeer.Buffers;
1326 }
1327
1328 if (!buffers) return;
1329
1330 OPTICK_EVENT(Optick::Category::Debug);
1331 for (unsigned i = 0; i < buffers->ComponentPools.size(); i++) {
1332 auto const& pool = buffers->ComponentPools[i];
1333 if (pool.size() > 0) {
1334 for (auto const& entity : pool) {
1335 auto type = ecsComponentData_.Get(ReplicationTypeIndex{ (uint16_t)i }).ComponentType;
1336
1337 if (type != UndefinedComponent) {
1338 log_.AddComponentChange(world, entity.Key(), type, ComponentChangeFlags::Replicate);
1339 }
1340 }
1341 }
1342 }
1343}
1344
1345void EntitySystemHelpersBase::OnFlushECBs()
1346{

Callers

nothing calls this directly

Calls 5

GetEntityWorldFunction · 0.85
GetEoCClientMethod · 0.80
AddComponentChangeMethod · 0.80
sizeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected