group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
InputSnapshot.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <cstdint>
7
8inline constexpr std::uint8_t kInvalidGrenadeSelectIndex = 0xff;
9
19{
20 uint32_t tick{0};
21
22 // Movement keys
23 bool forward{false};
24 bool back{false};
25 bool left{false};
26 bool right{false};
27 bool jump{false};
28 bool crouch{false};
29 bool sprint{false};
30 bool grapple{false};
31 bool shooting{false};
32 bool scoped{false};
33 bool reload{false};
34 bool pickup{false};
35 bool switchToPrimary{false};
36 bool switchToSecondary{false};
37 bool refillAmmo{false};
38 bool killSelf{false};
39 bool skipRespawn{false};
40 bool throwGrenade{false};
41 bool grenadeMenuHeld{false};
43 bool ability1{false};
44 bool ability2{false};
45 bool abilitySelectHeld{false};
46 bool abilitySelectLeft{false};
47 bool abilitySelectRight{false};
49
50 float yaw{0.0f};
51 float pitch{0.0f};
52 float roll{0.0f};
53
61 float prevTickYaw{0.0f};
62 float prevTickPitch{0.0f};
63};
constexpr std::uint8_t kInvalidGrenadeSelectIndex
Definition InputSnapshot.hpp:8
One tick of player input, stamped with the tick it was sampled on.
Definition InputSnapshot.hpp:19
bool switchToSecondary
Switch to gun in secondary slot.
Definition InputSnapshot.hpp:36
bool pickup
Pick Up button (f).
Definition InputSnapshot.hpp:34
bool killSelf
Debug: kill self (rising-edge only).
Definition InputSnapshot.hpp:38
bool grapple
Middle mouse button / E key.
Definition InputSnapshot.hpp:30
bool switchToPrimary
Switch to gun in primary slot.
Definition InputSnapshot.hpp:35
uint32_t tick
Physics tick this snapshot was sampled on.
Definition InputSnapshot.hpp:20
bool jump
Space key.
Definition InputSnapshot.hpp:27
float prevTickYaw
Yaw/pitch captured at the start of the most-recent physics tick.
Definition InputSnapshot.hpp:61
bool ability2
Activate ability 2.
Definition InputSnapshot.hpp:44
bool refillAmmo
Debug: refill all weapons to full ammo.
Definition InputSnapshot.hpp:37
float prevTickPitch
Definition InputSnapshot.hpp:62
float roll
Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt).
Definition InputSnapshot.hpp:52
bool throwGrenade
Quick G press: throw the selected grenade.
Definition InputSnapshot.hpp:40
bool abilitySelectRight
Choose the right pending ability option (edge-triggered).
Definition InputSnapshot.hpp:47
bool ability1
Activate ability 1.
Definition InputSnapshot.hpp:43
bool abilitySelectLeft
Choose the left pending ability option (edge-triggered).
Definition InputSnapshot.hpp:46
bool skipRespawn
Skip respawn timer (space while dead).
Definition InputSnapshot.hpp:39
bool right
D key.
Definition InputSnapshot.hpp:26
bool forward
W key.
Definition InputSnapshot.hpp:23
bool left
A key.
Definition InputSnapshot.hpp:25
bool reload
Reload button.
Definition InputSnapshot.hpp:33
float yaw
Horizontal look angle in radians (accumulated from mouse X deltas).
Definition InputSnapshot.hpp:50
bool scoped
Right click.
Definition InputSnapshot.hpp:32
bool crouch
Left Ctrl key.
Definition InputSnapshot.hpp:28
bool shooting
Primary fire button.
Definition InputSnapshot.hpp:31
float pitch
Vertical look angle in radians, clamped to [-89°, +89°] by InputSampleSystem.
Definition InputSnapshot.hpp:51
bool grenadeMenuHeld
True while the held-G radial menu is open.
Definition InputSnapshot.hpp:41
std::uint8_t grenadeSelectIndex
Hovered radial grenade index, or invalid.
Definition InputSnapshot.hpp:42
bool back
S key.
Definition InputSnapshot.hpp:24
bool debugGrantAbilityLevel
Debug: grant the next ability choice threshold.
Definition InputSnapshot.hpp:48
bool sprint
Left Shift key.
Definition InputSnapshot.hpp:29
bool abilitySelectHeld
True while holding the ability-selection modifier.
Definition InputSnapshot.hpp:45