diff --git a/src/game_api/game_patches.cpp b/src/game_api/game_patches.cpp index 22f09730f..62cfad3be 100644 --- a/src/game_api/game_patches.cpp +++ b/src/game_api/game_patches.cpp @@ -73,9 +73,7 @@ void clear_cutscene_behavior() } } } - // memory leak, ignore this, it's only temporary as proof of concept - state->entity_lookup->unknown1[2].ent_list = nullptr; - state->entity_lookup->unknown1[2].cap = 0; + // some bs, don't worry about it state->entity_lookup->unknown1[3].size = 0; state->entity_lookup->unknown3 = state->entity_lookup->unknown4; } diff --git a/src/game_api/state_structs.hpp b/src/game_api/state_structs.hpp index 2b73f21b1..420e15010 100644 --- a/src/game_api/state_structs.hpp +++ b/src/game_api/state_structs.hpp @@ -1007,11 +1007,10 @@ struct EntityLookup { std::array unknown1; - // is this vector? - // holds pointers to elements of the array above - // it's almost as static as the capacity is 5 and it can hold max 4 pointers - // in "empty" state it holds all 4 pointers - size_t unknown2; - size_t unknown3; - size_t unknown4; + // this is either very strange vector or something unrelated + // if this is vector, then it's just holds list of pointers to the elements from array above + // the result of the lookup would then be last element: (unknown3 - 1) + EntityList** unknown2; // always points to the first one? + EntityList** unknown3; // if lookup is not used, it's the same as unknown4 + EntityList** unknown4; // capacity? points to nullptr after all the other pointers };