// i_game_entity_system
template <typename t = c_base_entity> t *get_base_entity(int index) {
static const auto get_entity_by_id =
SIG("client.dll", "8B D3 E8 ? ? ? ? 48 8B F8 48 85 C0 74 76")
.absolute()
.cast<void *(__thiscall *)(void *, int)>();
return reinterpret_cast<t *>(get_entity_by_id(this, index));
}
int get_highest_entity_index() {
static const auto _fn = SIG("client.dll", "33 DB E8 ? ? ? ? 8B 08").absolute()
.cast<void(__thiscall *)(void *, int *)>();
int result = -1;
_fn(this, &result);
return result;
}