7#include <mathlib/vector.h>
26 Before(_hook.ForEvent()),
35 return std::unexpected(
Error::Unsupported(
"the CBaseEntity::Teleport vtable slot did not bind"));
runtime.Entities: finds and creates entities. Everything it returns is valid for this frame only; see...
A multicast signal with a fixed handler signature: the one way to subscribe in VoltMod.
A player's body: health, armor, movement, aim, weapons. The engine replaces it on every spawn; the Co...
Teleport(EntitySystem &entities, const Bindings &bindings)
Result< Subscription > HookVirtual(std::string_view name, const VirtualFn< Ret(Object *, Args...)> &function, Before &&before, After &&after=nullptr)
Hook a gamedata-bound virtual function on objects sharing its class vtable.
static std::string ReadFile(const std::filesystem::path &path)
constexpr bool IsValidSlot(int slot)
static Result< Subscription > HookTeleport(const Bindings &bindings, EntitySystem &entities, Event< int > &before)
std::expected< void, Error > Status
std::expected< T, Error > Result
VirtualFn< void(CEntityInstance *, const Vector *, const QAngle *, const Vector *)> Teleport
static Error Unsupported(std::string detail)