6#include <entityhandle.h>
9#include <tier1/utlvector.h>
22static_assert(
sizeof(Pawn) <= 160,
"Pawn is a frame-local value; keep the field list tight.");
26 return Origin() + ViewOffset();
44 const int health = Health();
70 return {*
_sys,
static_cast<CEntityInstance*
>(
given)};
88 return {*
_sys,
static_cast<CEntityInstance*
>(
given)};
194 return std::unexpected(
Error::NotReady(
"observer services unavailable"));
197 services.SetObserverMode(std::to_underlying(value));
209 const char* path =
skeleton.ModelState().ModelName();
210 return path ? std::string(path) : std::string{};
A player's identity behind a slot: name, money, team, scoreboard row. It survives death and respawn; ...
const VoltMod::Bindings & Bindings() const noexcept
VoltMod::Controller Controller(int slot)
Entity Get(EntityRef ref)
A live entity, valid for this frame only.
std::string_view ClassName() const
A player's body: health, armor, movement, aim, weapons. The engine replaces it on every spawn; the Co...
std::string ModelName() const
void SetGodmode(bool on) const
Vector EyePosition() const
bool StripWeapons(bool removeSuit=true) const
void SelectWeapon(const Entity &weapon) const
std::vector< Entity > Weapons() const
Entity GiveItem(std::string_view item) const
VoltMod::ObserverMode ObserverMode() const
void RemoveWeapon(const Entity &weapon) const
Status SetObserverMode(VoltMod::ObserverMode mode) const
bool Heal(int amount) const
void HoldFire(int tick) const
VoltMod::Controller Controller() const
void SetVelocity(Vector velocity) const
void SetNextPrimaryAttackTick(int32_t value) const
void * Base() const noexcept
void Warn(std::format_string< Args... > fmt, Args &&... args)
static std::string ReadFile(const std::filesystem::path &path)
constexpr bool IsValidSlot(int slot)
constexpr Team Opposite(Team team)
std::expected< void, Error > Status
VirtualFn< void(void *, bool)> RemoveAllItems
VirtualFn< bool(EngineWeaponServices *, CEntityInstance *, int)> SelectItem
VirtualFn< void(CEntityInstance *, bool, bool)> CommitSuicide
VirtualFn< void *(void *, const char *)> GiveNamedItem
static Error NotReady(std::string detail)