8 : _hook(
"Movement", [
this] {
return Install(); }),
9 Rewrite(_hook.ForEvent()),
10 Before(_hook.ForEvent()),
11 After(_hook.ForEvent()),
20 return std::unexpected(
available.error());
22 return _connect(*
this);
29 return std::unexpected(
Error::Unsupported(
"the CPlayer_MovementServices::RunCommand vtable slot did not bind"));
33 return std::unexpected(
Error::Unsupported(
"the CUserCmd::CSGOUserCmdPB offset did not bind"));
Movement(const Bindings &bindings, Connector connect)
Event< int, const PlayerInput & > Before
Event< int, PlayerInput & > Rewrite
void BeforeCommand(int slot, const PlayerInput &input)
Event< int, const PlayerInput & > After
std::function< Subscription(Movement &)> Connector
void AfterCommand(int slot, const PlayerInput &input)
static std::string ReadFile(const std::filesystem::path &path)
std::expected< void, Error > Status
Offset< void > UserCmdProto
VirtualFn< void *(EngineMovementServices *, void *)> RunCommand
static Error Unsupported(std::string detail)