7#include <entity2/entityidentity.h>
8#include <entity2/entityinstance.h>
9#include <entity2/entitysystem.h>
10#include <entityhandle.h>
68 if (
system && !_isRealSystem)
74 Log::Error(
"The GameEntitySystem offset {} does not reach a CGameEntitySystem; entity lookups are off.",
85 SetEntitySystem(
nullptr);
93 Log::Error(
"Entity system pointer could not be read from IGameResourceService.");
102 SetEntitySystem(ReadEntitySystemPointer());
120CEntityInstance* EntitySystem::RawController(
int slot)
145 return {*
this, RawController(
slot),
slot};
168 return {*
this,
iter.Next()};
173 std::vector<Entity>
found;
CGameEntitySystem * GameEntitySystem()
static CGameEntitySystem * g_entitySystem
A player's identity behind a slot: name, money, team, scoreboard row. It survives death and respawn; ...
VoltMod::Pawn Pawn() const
std::vector< Entity > FindAll(std::string_view className)
Entity Find(std::string_view className)
VoltMod::Controller Controller(int slot)
VoltMod::Pawn Pawn(int slot)
CGameEntitySystem * Raw()
Entity Get(EntityRef ref)
EntitySystem(VoltMod::Interfaces &interfaces, const VoltMod::Bindings &bindings)
A live entity, valid for this frame only.
constexpr int Value() const noexcept
T Read(const void *base) const
A player's body: health, armor, movement, aim, weapons. The engine replaces it on every spawn; the Co...
void Error(std::format_string< Args... > fmt, Args &&... args)
void Info(std::format_string< Args... > fmt, Args &&... args)
static constexpr std::string_view ControllerClass
static std::string ReadFile(const std::filesystem::path &path)
void * FindVirtualTable(std::string_view moduleName, std::string_view className)
bool IsInstanceOf(const void *object, const void *table)
Offset< CGameEntitySystem * > GameEntitySystem
Centralized holder for all HL2SDK interface pointers.
IGameResourceService * GameResourceService
CGameEntitySystem * EntitySystem