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

Method DebugLogUpdateChanges

BG3Extender/GameDefinitions/EntitySystem.cpp:1271–1288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1269}
1270
1271void EntitySystemHelpersBase::DebugLogUpdateChanges()
1272{
1273 OPTICK_EVENT(Optick::Category::Debug);
1274 auto world = GetEntityWorld();
1275
1276 auto const& changes = world->Cache->WriteChanges;
1277 for (unsigned i = 0; i < changes.AvailableComponentTypes.NumBits; i++) {
1278 if (changes.AvailableComponentTypes[i]) {
1279 auto const& changeSet = changes.ComponentsByType[i];
1280 for (unsigned j = 0; j < changeSet.Components.size(); j++) {
1281 auto entityHandle = changeSet.Components.key_at(j);
1282 auto const& change = changeSet.Components.Values[j];
1283
1284 log_.AddComponentChange(world, entityHandle, ComponentTypeIndex{ (uint16_t)i }, change.Ptr ? ComponentChangeFlags::Create : ComponentChangeFlags::Destroy);
1285 }
1286 }
1287 }
1288}
1289
1290void EntitySystemHelpersBase::PostUpdate()
1291{

Callers

nothing calls this directly

Calls 3

GetEntityWorldFunction · 0.85
AddComponentChangeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected