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 reload{false};
31 bool switchToPrimary{false};
32 bool switchToSecondary{false};
33 bool switchToTertiary{false};
34 bool switchToQuaternary{false};
35 bool refillAmmo{false};
36
37 float yaw{0.0f};
38 float pitch{0.0f};
39 float roll{0.0f};
40
48 float prevTickYaw{0.0f};
49 float prevTickPitch{0.0f};
50};
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:32
bool grapple
Middle mouse button / E key.
Definition InputSnapshot.hpp:28
bool switchToPrimary
Switch to gun in primary slot.
Definition InputSnapshot.hpp:31
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:48
bool switchToQuaternary
Switch to gun in quaternary slot.
Definition InputSnapshot.hpp:34
bool refillAmmo
Debug: refill all weapons to full ammo.
Definition InputSnapshot.hpp:35
float prevTickPitch
Definition InputSnapshot.hpp:49
float roll
Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt).
Definition InputSnapshot.hpp:39
bool switchToTertiary
Switch to gun in tertiary slot.
Definition InputSnapshot.hpp:33
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:30
float yaw
Horizontal look angle in radians (accumulated from mouse X deltas).
Definition InputSnapshot.hpp:37
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:38
bool back
S key.
Definition InputSnapshot.hpp:22
bool sprint
Left Shift key.
Definition InputSnapshot.hpp:27