|
group2 0.1.0
CSE 125 Group 2
|
Locomotion state for a player entity. More...
#include <PlayerState.hpp>
Public Attributes | |
| MoveMode | moveMode {MoveMode::OnFoot} |
| bool | grounded {false} |
| True when touching a floor surface this tick. | |
| bool | crouching {false} |
| True when crouch input is held. | |
| bool | sprinting {false} |
| True when sprint is active. | |
| bool | pendingUncrouch {false} |
| Deferred uncrouch (e.g. after slidehop); applied when safe. | |
| glm::vec3 | groundNormal {0, 1, 0} |
| Normal of the floor surface we're standing on. | |
| bool | canDoubleJump {true} |
| Reset on land / wallrun / climb. | |
| bool | jumpedThisTick {false} |
| Set during the tick a jump occurs (for lurch setup). | |
| int | jumpCount {0} |
| 0 = on ground, 1 = first jump, 2 = double jumped. | |
| bool | jumpHeldLastTick {false} |
| Was jump key held on the previous tick (for edge detection). | |
| float | jumpCooldown {0.0f} |
| Minimum time before double jump is available (s). | |
| float | coyoteTimer {0.0f} |
| Remaining grace time after leaving ground/wall (s). | |
| bool | wasGroundedLastTick {false} |
| bool | jumpLurchEnabled {false} |
| True during the lurch grace window after jumping. | |
| float | jumpLurchTimer {0.0f} |
| Time elapsed since the jump that enabled lurch (s). | |
| glm::vec2 | moveInputsOnJump {0.0f} |
| WASD direction when jump started (for detecting direction change). | |
| float | slideTimer {0.0f} |
| How long the current slide has lasted (s). | |
| int | slideFatigueCounter {0} |
| Diminishing returns on consecutive slidehops. | |
| float | slideBoostCooldown {0.0f} |
| Remaining cooldown before next slide boost (s). | |
| int | slideFatigueDecayAccum {0} |
| Tick accumulator for fatigue recovery. | |
| bool | canEnterSlide {true} |
| Cleared when in air, set on landing. | |
| WallSide | wallRunSide {WallSide::None} |
| glm::vec3 | wallNormal {0.0f} |
| Normal of the wall being run on. | |
| glm::vec3 | wallForward {0.0f} |
| Direction of travel along the wall. | |
| float | wallRunTimer {0.0f} |
| Time on current wall (s). | |
| float | wallRunSpeedTimer {0.0f} |
| Timer for the speed-loss delay. | |
| bool | exitingWall {false} |
| True for a brief period after leaving a wall. | |
| float | exitWallTimer {0.0f} |
| Remaining exit-wall time (s). | |
| bool | wasWallRunning {false} |
| Set briefly after leaving wallrun (for coyote wall jump). | |
| glm::vec3 | wallBlacklistNormal {0.0f} |
| float | wallBlacklistHeight {-1e10f} |
| bool | wallBlacklistActive {false} |
| glm::vec3 | climbWallNormal {0.0f} |
| Normal of the wall being climbed. | |
| float | climbTimer {0.0f} |
| Time on current climb (s). | |
| bool | exitingClimb {false} |
| float | exitClimbTimer {0.0f} |
| bool | wasClimbing {false} |
| glm::vec3 | climbBlacklistNormal {0.0f} |
| float | climbBlacklistHeight {-1e10f} |
| bool | climbBlacklistActive {false} |
| glm::vec3 | ledgePoint {0.0f} |
| World-space position of the grabbed ledge. | |
| glm::vec3 | ledgeNormal {0.0f} |
| Wall normal at the ledge. | |
| float | ledgeHoldTimer {0.0f} |
| Time spent holding the ledge (s). | |
| bool | exitingLedge {false} |
| float | exitLedgeTimer {0.0f} |
| bool | grappleActive {false} |
| True while being pulled toward anchor. | |
| bool | grappleCooldownActive {false} |
| True during cooldown between uses. | |
| float | grappleCooldownTimer {0.0f} |
| Remaining cooldown time (s). | |
| float | grapplePullTimer {0.0f} |
| Time spent being pulled (s). | |
| glm::vec3 | grapplePoint {0.0f} |
| World-space anchor point. | |
| glm::vec3 | grapplePullDir {0.0f} |
| Cached pull direction (toward anchor at fire time). | |
| bool | grappleInputLastTick {false} |
| For edge detection on the grapple key. | |
| float | targetCameraTilt {0.0f} |
| Target camera roll for wallrun lean (degrees). | |
Locomotion state for a player entity.
Read/written by MovementSystem and CollisionSystem. Extended for Titanfall-style movement mechanics.
| bool PlayerState::canDoubleJump {true} |
Reset on land / wallrun / climb.
| bool PlayerState::canEnterSlide {true} |
Cleared when in air, set on landing.
| bool PlayerState::climbBlacklistActive {false} |
| float PlayerState::climbBlacklistHeight {-1e10f} |
| glm::vec3 PlayerState::climbBlacklistNormal {0.0f} |
| float PlayerState::climbTimer {0.0f} |
Time on current climb (s).
| glm::vec3 PlayerState::climbWallNormal {0.0f} |
Normal of the wall being climbed.
| float PlayerState::coyoteTimer {0.0f} |
Remaining grace time after leaving ground/wall (s).
| bool PlayerState::crouching {false} |
True when crouch input is held.
| float PlayerState::exitClimbTimer {0.0f} |
| bool PlayerState::exitingClimb {false} |
| bool PlayerState::exitingLedge {false} |
| bool PlayerState::exitingWall {false} |
True for a brief period after leaving a wall.
| float PlayerState::exitLedgeTimer {0.0f} |
| float PlayerState::exitWallTimer {0.0f} |
Remaining exit-wall time (s).
| bool PlayerState::grappleActive {false} |
True while being pulled toward anchor.
| bool PlayerState::grappleCooldownActive {false} |
True during cooldown between uses.
| float PlayerState::grappleCooldownTimer {0.0f} |
Remaining cooldown time (s).
| bool PlayerState::grappleInputLastTick {false} |
For edge detection on the grapple key.
| glm::vec3 PlayerState::grapplePoint {0.0f} |
World-space anchor point.
| glm::vec3 PlayerState::grapplePullDir {0.0f} |
Cached pull direction (toward anchor at fire time).
| float PlayerState::grapplePullTimer {0.0f} |
Time spent being pulled (s).
| bool PlayerState::grounded {false} |
True when touching a floor surface this tick.
| glm::vec3 PlayerState::groundNormal {0, 1, 0} |
Normal of the floor surface we're standing on.
| float PlayerState::jumpCooldown {0.0f} |
Minimum time before double jump is available (s).
| int PlayerState::jumpCount {0} |
0 = on ground, 1 = first jump, 2 = double jumped.
| bool PlayerState::jumpedThisTick {false} |
Set during the tick a jump occurs (for lurch setup).
| bool PlayerState::jumpHeldLastTick {false} |
Was jump key held on the previous tick (for edge detection).
| bool PlayerState::jumpLurchEnabled {false} |
True during the lurch grace window after jumping.
| float PlayerState::jumpLurchTimer {0.0f} |
Time elapsed since the jump that enabled lurch (s).
| float PlayerState::ledgeHoldTimer {0.0f} |
Time spent holding the ledge (s).
| glm::vec3 PlayerState::ledgeNormal {0.0f} |
Wall normal at the ledge.
| glm::vec3 PlayerState::ledgePoint {0.0f} |
World-space position of the grabbed ledge.
| glm::vec2 PlayerState::moveInputsOnJump {0.0f} |
WASD direction when jump started (for detecting direction change).
| MoveMode PlayerState::moveMode {MoveMode::OnFoot} |
| bool PlayerState::pendingUncrouch {false} |
Deferred uncrouch (e.g. after slidehop); applied when safe.
| float PlayerState::slideBoostCooldown {0.0f} |
Remaining cooldown before next slide boost (s).
| int PlayerState::slideFatigueCounter {0} |
Diminishing returns on consecutive slidehops.
| int PlayerState::slideFatigueDecayAccum {0} |
Tick accumulator for fatigue recovery.
| float PlayerState::slideTimer {0.0f} |
How long the current slide has lasted (s).
| bool PlayerState::sprinting {false} |
True when sprint is active.
| float PlayerState::targetCameraTilt {0.0f} |
Target camera roll for wallrun lean (degrees).
| bool PlayerState::wallBlacklistActive {false} |
| float PlayerState::wallBlacklistHeight {-1e10f} |
| glm::vec3 PlayerState::wallBlacklistNormal {0.0f} |
| glm::vec3 PlayerState::wallForward {0.0f} |
Direction of travel along the wall.
| glm::vec3 PlayerState::wallNormal {0.0f} |
Normal of the wall being run on.
| WallSide PlayerState::wallRunSide {WallSide::None} |
| float PlayerState::wallRunSpeedTimer {0.0f} |
Timer for the speed-loss delay.
| float PlayerState::wallRunTimer {0.0f} |
Time on current wall (s).
| bool PlayerState::wasClimbing {false} |
| bool PlayerState::wasGroundedLastTick {false} |
| bool PlayerState::wasWallRunning {false} |
Set briefly after leaving wallrun (for coyote wall jump).