|
group2 0.1.0
CSE 125 Group 2
|
One tick of player input, stamped with the tick it was sampled on. More...
#include <InputSnapshot.hpp>
Public Attributes | |
| uint32_t | tick {0} |
| Physics tick this snapshot was sampled on. | |
| bool | forward {false} |
| W key. | |
| bool | back {false} |
| S key. | |
| bool | left {false} |
| A key. | |
| bool | right {false} |
| D key. | |
| bool | jump {false} |
| Space key. | |
| bool | crouch {false} |
| Left Ctrl key. | |
| bool | sprint {false} |
| Left Shift key. | |
| bool | grapple {false} |
| Middle mouse button / E key. | |
| bool | shooting {false} |
| Primary fire button. | |
| bool | scoped {false} |
| Right click. | |
| bool | reload {false} |
| Reload button. | |
| bool | pickup {false} |
| Pick Up button (f). | |
| bool | switchToPrimary {false} |
| Switch to gun in primary slot. | |
| bool | switchToSecondary {false} |
| Switch to gun in secondary slot. | |
| bool | refillAmmo {false} |
| Debug: refill all weapons to full ammo. | |
| std::int8_t | debugSetPrimaryWeapon {-1} |
| Debug: replace the weapon in the primary/secondary slot with the given WeaponType ordinal. | |
| std::int8_t | debugSetSecondaryWeapon {-1} |
| bool | killSelf {false} |
| Debug: kill self (rising-edge only). | |
| bool | skipRespawn {false} |
| Skip respawn timer (space while dead). | |
| std::int8_t | emoteRequest {-1} |
| Emote wheel selection to trigger this tick (index into the emote catalog, see EmoteCatalog.hpp). | |
| bool | throwGrenade {false} |
| Tap-G (no cycle): throw the selected grenade. Edge-pulsed once. | |
| bool | grenadeCycleNext {false} |
| Hold-G + Shoot: select next grenade type. Edge-pulsed once. | |
| bool | grenadeCyclePrev {false} |
| Hold-G + Scope: select previous grenade type. Edge-pulsed once. | |
| bool | ability1 {false} |
| Activate ability 1. | |
| bool | ability2 {false} |
| Activate ability 2. | |
| bool | abilitySelectHeld {false} |
| True while holding the ability-selection modifier. | |
| bool | abilitySelectLeft {false} |
| Choose the left pending ability option (edge-triggered). | |
| bool | abilitySelectRight {false} |
| Choose the right pending ability option (edge-triggered). | |
| bool | debugGrantAbilityLevel {false} |
| Debug: grant the next ability choice threshold. | |
| float | yaw {0.0f} |
| Horizontal look angle in radians (accumulated from mouse X deltas). | |
| float | pitch {0.0f} |
| Vertical look angle in radians, clamped to [-89°, +89°] by InputSampleSystem. | |
| float | roll {0.0f} |
| Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt). | |
| float | prevTickYaw {0.0f} |
| Yaw/pitch captured at the start of the most-recent physics tick. | |
| float | prevTickPitch {0.0f} |
One tick of player input, stamped with the tick it was sampled on.
Sent client → server each tick. Stored in the client's ring buffer for prediction reconciliation.
yaw and pitch are absolute orientations in radians, not deltas. The server needs the full orientation to compute wishDir correctly. pitch is clamped to [-89°, +89°] (~1.5533 rad) by InputSampleSystem.
| bool InputSnapshot::ability1 {false} |
Activate ability 1.
| bool InputSnapshot::ability2 {false} |
Activate ability 2.
| bool InputSnapshot::abilitySelectHeld {false} |
True while holding the ability-selection modifier.
| bool InputSnapshot::abilitySelectLeft {false} |
Choose the left pending ability option (edge-triggered).
| bool InputSnapshot::abilitySelectRight {false} |
Choose the right pending ability option (edge-triggered).
| bool InputSnapshot::back {false} |
S key.
| bool InputSnapshot::crouch {false} |
Left Ctrl key.
| bool InputSnapshot::debugGrantAbilityLevel {false} |
Debug: grant the next ability choice threshold.
| std::int8_t InputSnapshot::debugSetPrimaryWeapon {-1} |
Debug: replace the weapon in the primary/secondary slot with the given WeaponType ordinal.
-1 = no change. Consumed (reset to -1) by WeaponSystem.
| std::int8_t InputSnapshot::debugSetSecondaryWeapon {-1} |
| std::int8_t InputSnapshot::emoteRequest {-1} |
Emote wheel selection to trigger this tick (index into the emote catalog, see EmoteCatalog.hpp).
-1 = no request. Edge-pulsed once on wheel release; the server starts the emote and the client mirrors it.
| bool InputSnapshot::forward {false} |
W key.
| bool InputSnapshot::grapple {false} |
Middle mouse button / E key.
| bool InputSnapshot::grenadeCycleNext {false} |
Hold-G + Shoot: select next grenade type. Edge-pulsed once.
| bool InputSnapshot::grenadeCyclePrev {false} |
Hold-G + Scope: select previous grenade type. Edge-pulsed once.
| bool InputSnapshot::jump {false} |
Space key.
| bool InputSnapshot::killSelf {false} |
Debug: kill self (rising-edge only).
| bool InputSnapshot::left {false} |
A key.
| bool InputSnapshot::pickup {false} |
Pick Up button (f).
| float InputSnapshot::pitch {0.0f} |
Vertical look angle in radians, clamped to [-89°, +89°] by InputSampleSystem.
| float InputSnapshot::prevTickPitch {0.0f} |
| float InputSnapshot::prevTickYaw {0.0f} |
Yaw/pitch captured at the start of the most-recent physics tick.
Used by the renderer to interpolate orientation with the same alpha as position, keeping camera eye and look-direction on the same timebase. Without this, yaw snaps to the newest value every frame while the eye position lags behind by up to one tick — causing objects to jitter on screen when strafing and rotating simultaneously (orbiting).
| bool InputSnapshot::refillAmmo {false} |
Debug: refill all weapons to full ammo.
| bool InputSnapshot::reload {false} |
Reload button.
| bool InputSnapshot::right {false} |
D key.
| float InputSnapshot::roll {0.0f} |
Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt).
| bool InputSnapshot::scoped {false} |
Right click.
| bool InputSnapshot::shooting {false} |
Primary fire button.
| bool InputSnapshot::skipRespawn {false} |
Skip respawn timer (space while dead).
| bool InputSnapshot::sprint {false} |
Left Shift key.
| bool InputSnapshot::switchToPrimary {false} |
Switch to gun in primary slot.
| bool InputSnapshot::switchToSecondary {false} |
Switch to gun in secondary slot.
| bool InputSnapshot::throwGrenade {false} |
Tap-G (no cycle): throw the selected grenade. Edge-pulsed once.
| uint32_t InputSnapshot::tick {0} |
Physics tick this snapshot was sampled on.
| float InputSnapshot::yaw {0.0f} |
Horizontal look angle in radians (accumulated from mouse X deltas).