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
16
struct
InputSnapshot
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
};
InputSnapshot
One tick of player input, stamped with the tick it was sampled on.
Definition
InputSnapshot.hpp:17
InputSnapshot::switchToSecondary
bool switchToSecondary
Switch to gun in secondary slot.
Definition
InputSnapshot.hpp:32
InputSnapshot::grapple
bool grapple
Middle mouse button / E key.
Definition
InputSnapshot.hpp:28
InputSnapshot::switchToPrimary
bool switchToPrimary
Switch to gun in primary slot.
Definition
InputSnapshot.hpp:31
InputSnapshot::tick
uint32_t tick
Physics tick this snapshot was sampled on.
Definition
InputSnapshot.hpp:18
InputSnapshot::jump
bool jump
Space key.
Definition
InputSnapshot.hpp:25
InputSnapshot::prevTickYaw
float prevTickYaw
Yaw/pitch captured at the start of the most-recent physics tick.
Definition
InputSnapshot.hpp:48
InputSnapshot::switchToQuaternary
bool switchToQuaternary
Switch to gun in quaternary slot.
Definition
InputSnapshot.hpp:34
InputSnapshot::refillAmmo
bool refillAmmo
Debug: refill all weapons to full ammo.
Definition
InputSnapshot.hpp:35
InputSnapshot::prevTickPitch
float prevTickPitch
Definition
InputSnapshot.hpp:49
InputSnapshot::roll
float roll
Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt).
Definition
InputSnapshot.hpp:39
InputSnapshot::switchToTertiary
bool switchToTertiary
Switch to gun in tertiary slot.
Definition
InputSnapshot.hpp:33
InputSnapshot::right
bool right
D key.
Definition
InputSnapshot.hpp:24
InputSnapshot::forward
bool forward
W key.
Definition
InputSnapshot.hpp:21
InputSnapshot::left
bool left
A key.
Definition
InputSnapshot.hpp:23
InputSnapshot::reload
bool reload
Reload button.
Definition
InputSnapshot.hpp:30
InputSnapshot::yaw
float yaw
Horizontal look angle in radians (accumulated from mouse X deltas).
Definition
InputSnapshot.hpp:37
InputSnapshot::crouch
bool crouch
Left Ctrl key.
Definition
InputSnapshot.hpp:26
InputSnapshot::shooting
bool shooting
Primary fire button.
Definition
InputSnapshot.hpp:29
InputSnapshot::pitch
float pitch
Vertical look angle in radians, clamped to [-89°, +89°] by InputSampleSystem.
Definition
InputSnapshot.hpp:38
InputSnapshot::back
bool back
S key.
Definition
InputSnapshot.hpp:22
InputSnapshot::sprint
bool sprint
Left Shift key.
Definition
InputSnapshot.hpp:27
src
ecs
components
InputSnapshot.hpp
Generated by
1.9.8