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

Method GetChange

BG3Extender/GameDefinitions/EntitySystem.cpp:360–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360void* ImmediateWorldCache::Changes::GetChange(EntityHandle entityHandle, ComponentTypeIndex type) const
361{
362 auto typeIdx = (uint16_t)type;
363 if (AvailableComponentTypes[typeIdx]) {
364 auto change = ComponentsByType[typeIdx].Components.find(entityHandle);
365 if (change) {
366 return change->Ptr;
367 }
368 }
369
370 return nullptr;
371}
372
373ImmediateWorldCache::ComponentChanges* ImmediateWorldCache::Changes::GetOrAddComponentChanges(ComponentTypeEntry const* type, FrameAllocator* allocator)
374{

Callers 1

GetRawComponentMethod · 0.80

Calls 1

findMethod · 0.45

Tested by

no test coverage detected