void C_BasePlayer::UpdateVisibilityAllEntities()
{
static uintptr_t* update_visibility_all_entities = nullptr;
if (update_visibility_all_entities == nullptr) {
static DWORD callInstruction = Engine::Displacement::Signatures[c_signatures::UPDATEVISIBILITY_ALLENTS]; // get the instruction address
static DWORD relativeAddress = *(DWORD*)(callInstruction + 1); // read the rel32
static DWORD nextInstruction = callInstruction + 5; // get the address of next instruction
update_visibility_all_entities = (uintptr_t*)(nextInstruction + relativeAddress); // our function address will be nextInstruction + relativeAddress
}
else
reinterpret_cast<void(__thiscall*)(void*)>(update_visibility_all_entities)(this);
}