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
17{
18 uint32_t tick{0};
19
20 // Movement keys
21 bool forward{false};
22 bool back{false};
23 bool left{false};
24 bool right{false};
25 bool jump{false};
26 bool crouch{false};
27 bool sprint{false};
28 bool grapple{false};
29 bool shooting{false};
30 bool scoped{false};
31 bool reload{false};
32 bool pickup{false};
33 bool switchToPrimary{false};
34 bool switchToSecondary{false};
35 bool refillAmmo{false};
38 std::int8_t debugSetPrimaryWeapon{-1};
39 std::int8_t debugSetSecondaryWeapon{-1};
40 bool killSelf{false};
41 bool skipRespawn{false};
45 std::int8_t emoteRequest{-1};
46 bool throwGrenade{false};
47 bool grenadeCycleNext{false};
48 bool grenadeCyclePrev{false};
49 bool ability1{false};
50 bool ability2{false};
51 bool abilitySelectHeld{false};
52 bool abilitySelectLeft{false};
53 bool abilitySelectRight{false};
55
56 float yaw{0.0f};
57 float pitch{0.0f};
58 float roll{0.0f};
59
67 float prevTickYaw{0.0f};
68 float prevTickPitch{0.0f};
69};
One tick of player input, stamped with the tick it was sampled on.
Definition InputSnapshot.hpp:17
bool switchToSecondary
Switch to gun in secondary slot.
Definition InputSnapshot.hpp:34
bool pickup
Pick Up button (f).
Definition InputSnapshot.hpp:32
bool killSelf
Debug: kill self (rising-edge only).
Definition InputSnapshot.hpp:40
bool grenadeCycleNext
Hold-G + Shoot: select next grenade type. Edge-pulsed once.
Definition InputSnapshot.hpp:47
bool grapple
Middle mouse button / E key.
Definition InputSnapshot.hpp:28
bool switchToPrimary
Switch to gun in primary slot.
Definition InputSnapshot.hpp:33
uint32_t tick
Physics tick this snapshot was sampled on.
Definition InputSnapshot.hpp:18
bool jump
Space key.
Definition InputSnapshot.hpp:25
float prevTickYaw
Yaw/pitch captured at the start of the most-recent physics tick.
Definition InputSnapshot.hpp:67
bool ability2
Activate ability 2.
Definition InputSnapshot.hpp:50
bool refillAmmo
Debug: refill all weapons to full ammo.
Definition InputSnapshot.hpp:35
float prevTickPitch
Definition InputSnapshot.hpp:68
float roll
Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt).
Definition InputSnapshot.hpp:58
bool throwGrenade
Tap-G (no cycle): throw the selected grenade. Edge-pulsed once.
Definition InputSnapshot.hpp:46
bool abilitySelectRight
Choose the right pending ability option (edge-triggered).
Definition InputSnapshot.hpp:53
bool ability1
Activate ability 1.
Definition InputSnapshot.hpp:49
std::int8_t emoteRequest
Emote wheel selection to trigger this tick (index into the emote catalog, see EmoteCatalog....
Definition InputSnapshot.hpp:45
bool abilitySelectLeft
Choose the left pending ability option (edge-triggered).
Definition InputSnapshot.hpp:52
bool skipRespawn
Skip respawn timer (space while dead).
Definition InputSnapshot.hpp:41
bool right
D key.
Definition InputSnapshot.hpp:24
bool forward
W key.
Definition InputSnapshot.hpp:21
bool left
A key.
Definition InputSnapshot.hpp:23
bool reload
Reload button.
Definition InputSnapshot.hpp:31
float yaw
Horizontal look angle in radians (accumulated from mouse X deltas).
Definition InputSnapshot.hpp:56
bool scoped
Right click.
Definition InputSnapshot.hpp:30
std::int8_t debugSetSecondaryWeapon
Definition InputSnapshot.hpp:39
bool grenadeCyclePrev
Hold-G + Scope: select previous grenade type. Edge-pulsed once.
Definition InputSnapshot.hpp:48
bool crouch
Left Ctrl key.
Definition InputSnapshot.hpp:26
bool shooting
Primary fire button.
Definition InputSnapshot.hpp:29
float pitch
Vertical look angle in radians, clamped to [-89°, +89°] by InputSampleSystem.
Definition InputSnapshot.hpp:57
bool back
S key.
Definition InputSnapshot.hpp:22
bool debugGrantAbilityLevel
Debug: grant the next ability choice threshold.
Definition InputSnapshot.hpp:54
std::int8_t debugSetPrimaryWeapon
Debug: replace the weapon in the primary/secondary slot with the given WeaponType ordinal.
Definition InputSnapshot.hpp:38
bool sprint
Left Shift key.
Definition InputSnapshot.hpp:27
bool abilitySelectHeld
True while holding the ability-selection modifier.
Definition InputSnapshot.hpp:51