|
VoltMod
C++23 framework for CS2 server plugins
|
Protobuf-free snapshot of the CUserCmd handed to CPlayer_MovementServices::RunCommand, decoded once per command by Movement. More...
#include <PlayerInput.hpp>
Public Member Functions | |
| std::span< const SubtickMove > | Subticks () const |
| std::span< const InputHistorySample > | InputHistory () const |
| std::optional< InputHistorySample > | SampleAt (int index) const |
Public Attributes | |
| bool | Valid = false |
| int32_t | ClientTick = 0 |
| int32_t | CommandNumber = 0 |
| bool | HasViewAngles = false |
| float | ViewPitch = 0.0f |
| float | ViewYaw = 0.0f |
| float | ViewRoll = 0.0f |
| float | ForwardMove = 0.0f |
| float | LeftMove = 0.0f |
| uint64_t | ButtonsHeld = 0 |
| uint64_t | ButtonsChanged = 0 |
| int32_t | MouseDx = 0 |
| int32_t | MouseDy = 0 |
| int32_t | Attack1StartHistoryIndex = -1 |
| int32_t | Attack2StartHistoryIndex = -1 |
| int | SubtickMoveCount = 0 |
| std::array< SubtickMove, MaxSubtickMoves > | SubtickMoves {} |
| int | InputHistoryCount = 0 |
| int | InputHistorySent = 0 |
| std::array< InputHistorySample, MaxInputHistory > | InputHistorySamples {} |
Static Public Attributes | |
| static constexpr int | MaxSubtickMoves = 12 |
| static constexpr int | MaxInputHistory = 16 |
Protobuf-free snapshot of the CUserCmd handed to CPlayer_MovementServices::RunCommand, decoded once per command by Movement.
Valid is false when the usercmd pointer was null or the "CUserCmd::CSGOUserCmdPB" gamedata offset is missing - fields then hold their defaults and must not be trusted.
Definition at line 41 of file PlayerInput.hpp.
|
inline |
The decoded fired-view samples.
Definition at line 94 of file PlayerInput.hpp.
References InputHistoryCount, and InputHistorySamples.
|
inline |
The decoded entry at index, or nullopt when index is negative or was capped away.
Definition at line 100 of file PlayerInput.hpp.
References InputHistoryCount, InputHistorySamples, and VoltMod::ReadFile().
|
inline |
The decoded sub-tick steps.
Definition at line 88 of file PlayerInput.hpp.
References SubtickMoveCount, and SubtickMoves.
| int32_t VoltMod::PlayerInput::Attack1StartHistoryIndex = -1 |
Definition at line 71 of file PlayerInput.hpp.
| int32_t VoltMod::PlayerInput::Attack2StartHistoryIndex = -1 |
Definition at line 72 of file PlayerInput.hpp.
| uint64_t VoltMod::PlayerInput::ButtonsChanged = 0 |
Definition at line 64 of file PlayerInput.hpp.
| uint64_t VoltMod::PlayerInput::ButtonsHeld = 0 |
Definition at line 63 of file PlayerInput.hpp.
| int32_t VoltMod::PlayerInput::ClientTick = 0 |
Definition at line 44 of file PlayerInput.hpp.
| int32_t VoltMod::PlayerInput::CommandNumber = 0 |
Definition at line 48 of file PlayerInput.hpp.
| float VoltMod::PlayerInput::ForwardMove = 0.0f |
Definition at line 59 of file PlayerInput.hpp.
False when the client omitted viewangles: the three fields below then hold defaults rather than a reading, so treat the angles as untrusted.
Definition at line 52 of file PlayerInput.hpp.
| int VoltMod::PlayerInput::InputHistoryCount = 0 |
Definition at line 81 of file PlayerInput.hpp.
Referenced by InputHistory(), and SampleAt().
| std::array<InputHistorySample, MaxInputHistory> VoltMod::PlayerInput::InputHistorySamples {} |
Definition at line 85 of file PlayerInput.hpp.
Referenced by InputHistory(), and SampleAt().
| int VoltMod::PlayerInput::InputHistorySent = 0 |
Entries the client actually sent, before the MaxInputHistory cap. Greater than InputHistoryCount means the tail was capped away.
Definition at line 84 of file PlayerInput.hpp.
| float VoltMod::PlayerInput::LeftMove = 0.0f |
Definition at line 60 of file PlayerInput.hpp.
Definition at line 80 of file PlayerInput.hpp.
Definition at line 74 of file PlayerInput.hpp.
| int32_t VoltMod::PlayerInput::MouseDx = 0 |
Definition at line 67 of file PlayerInput.hpp.
| int32_t VoltMod::PlayerInput::MouseDy = 0 |
Definition at line 68 of file PlayerInput.hpp.
| int VoltMod::PlayerInput::SubtickMoveCount = 0 |
Definition at line 75 of file PlayerInput.hpp.
Referenced by Subticks().
| std::array<SubtickMove, MaxSubtickMoves> VoltMod::PlayerInput::SubtickMoves {} |
Definition at line 76 of file PlayerInput.hpp.
Referenced by Subticks().
Definition at line 43 of file PlayerInput.hpp.
| float VoltMod::PlayerInput::ViewPitch = 0.0f |
Definition at line 55 of file PlayerInput.hpp.
| float VoltMod::PlayerInput::ViewRoll = 0.0f |
Definition at line 57 of file PlayerInput.hpp.
| float VoltMod::PlayerInput::ViewYaw = 0.0f |
Definition at line 56 of file PlayerInput.hpp.