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
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
};
54
bool
debugGrantAbilityLevel
{
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
};
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:34
InputSnapshot::pickup
bool pickup
Pick Up button (f).
Definition
InputSnapshot.hpp:32
InputSnapshot::killSelf
bool killSelf
Debug: kill self (rising-edge only).
Definition
InputSnapshot.hpp:40
InputSnapshot::grenadeCycleNext
bool grenadeCycleNext
Hold-G + Shoot: select next grenade type. Edge-pulsed once.
Definition
InputSnapshot.hpp:47
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:33
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:67
InputSnapshot::ability2
bool ability2
Activate ability 2.
Definition
InputSnapshot.hpp:50
InputSnapshot::refillAmmo
bool refillAmmo
Debug: refill all weapons to full ammo.
Definition
InputSnapshot.hpp:35
InputSnapshot::prevTickPitch
float prevTickPitch
Definition
InputSnapshot.hpp:68
InputSnapshot::roll
float roll
Currently always 0; reserved for dynamic movement tilt (wallrun lean, strafe tilt).
Definition
InputSnapshot.hpp:58
InputSnapshot::throwGrenade
bool throwGrenade
Tap-G (no cycle): throw the selected grenade. Edge-pulsed once.
Definition
InputSnapshot.hpp:46
InputSnapshot::abilitySelectRight
bool abilitySelectRight
Choose the right pending ability option (edge-triggered).
Definition
InputSnapshot.hpp:53
InputSnapshot::ability1
bool ability1
Activate ability 1.
Definition
InputSnapshot.hpp:49
InputSnapshot::emoteRequest
std::int8_t emoteRequest
Emote wheel selection to trigger this tick (index into the emote catalog, see EmoteCatalog....
Definition
InputSnapshot.hpp:45
InputSnapshot::abilitySelectLeft
bool abilitySelectLeft
Choose the left pending ability option (edge-triggered).
Definition
InputSnapshot.hpp:52
InputSnapshot::skipRespawn
bool skipRespawn
Skip respawn timer (space while dead).
Definition
InputSnapshot.hpp:41
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:31
InputSnapshot::yaw
float yaw
Horizontal look angle in radians (accumulated from mouse X deltas).
Definition
InputSnapshot.hpp:56
InputSnapshot::scoped
bool scoped
Right click.
Definition
InputSnapshot.hpp:30
InputSnapshot::debugSetSecondaryWeapon
std::int8_t debugSetSecondaryWeapon
Definition
InputSnapshot.hpp:39
InputSnapshot::grenadeCyclePrev
bool grenadeCyclePrev
Hold-G + Scope: select previous grenade type. Edge-pulsed once.
Definition
InputSnapshot.hpp:48
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:57
InputSnapshot::back
bool back
S key.
Definition
InputSnapshot.hpp:22
InputSnapshot::debugGrantAbilityLevel
bool debugGrantAbilityLevel
Debug: grant the next ability choice threshold.
Definition
InputSnapshot.hpp:54
InputSnapshot::debugSetPrimaryWeapon
std::int8_t debugSetPrimaryWeapon
Debug: replace the weapon in the primary/secondary slot with the given WeaponType ordinal.
Definition
InputSnapshot.hpp:38
InputSnapshot::sprint
bool sprint
Left Shift key.
Definition
InputSnapshot.hpp:27
InputSnapshot::abilitySelectHeld
bool abilitySelectHeld
True while holding the ability-selection modifier.
Definition
InputSnapshot.hpp:51
src
ecs
components
InputSnapshot.hpp
Generated by
1.16.1