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

Method IsEntityAlive

BG3Extender/GameDefinitions/EntitySystem.cpp:224–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224bool EntityHandleGenerator::IsEntityAlive(EntityHandle entity) const
225{
226 if (entity.GetThreadIndex() < ThreadStates.size()) {
227 auto const& state = ThreadStates[entity.GetThreadIndex()];
228 if (entity.GetIndex() < state.Entries.size()) {
229 auto const& entry = state.Entries[entity.GetIndex()];
230 return entry.Index == entity.GetIndex()
231 && entry.Salt == entity.GetSalt();
232 }
233 }
234
235 return false;
236}
237
238EntityHandle EntityHandleGenerator::Create()
239{

Callers 1

DestroyEntityMethod · 0.80

Calls 4

GetThreadIndexMethod · 0.80
sizeMethod · 0.45
GetIndexMethod · 0.45
GetSaltMethod · 0.45

Tested by

no test coverage detected