group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PlayerSimState Struct Reference

Server-only locomotion bookkeeping. More...

#include <PlayerSimState.hpp>

Public Attributes

bool canDoubleJump {true}
 Reset on land / wallrun / climb.
bool jumpedThisTick {false}
 Set during the tick a jump occurs (for lurch setup).
bool jumpHeldLastTick {false}
 Was jump key held on the previous tick (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}
float groundedDuration {0.0f}
 Time continuously grounded (s); resets on leaving ground.
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 direction-change detection).
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.
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.
float exitWallTimer {0.0f}
 Remaining exit-wall grace time (s).
bool wasWallRunning {false}
 Set briefly after leaving wallrun (coyote wall jump).
glm::vec3 wallBlacklistNormal {0.0f}
float wallBlacklistHeight {-1e10f}
bool wallBlacklistActive {false}
bool wallJumpLocked {false}
 Wall-jump autobhop lock.
glm::vec3 climbWallNormal {0.0f}
 Normal of the wall being climbed.
float climbTimer {0.0f}
 Time on current climb (s).
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 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 grapplePullDir {0.0f}
 Cached pull direction (toward anchor at fire time).
bool grappleInputLastTick {false}
 Edge detection on the grapple key.

Detailed Description

Server-only locomotion bookkeeping.

Read/written by MovementSystem and CollisionSystem on the server every physics tick. Will be mirrored on the owning client in Phase 5 for prediction; remote clients never see this.

Member Data Documentation

◆ canDoubleJump

bool PlayerSimState::canDoubleJump {true}

Reset on land / wallrun / climb.

◆ canEnterSlide

bool PlayerSimState::canEnterSlide {true}

Cleared when in air, set on landing.

◆ climbBlacklistActive

bool PlayerSimState::climbBlacklistActive {false}

◆ climbBlacklistHeight

float PlayerSimState::climbBlacklistHeight {-1e10f}

◆ climbBlacklistNormal

glm::vec3 PlayerSimState::climbBlacklistNormal {0.0f}

◆ climbTimer

float PlayerSimState::climbTimer {0.0f}

Time on current climb (s).

◆ climbWallNormal

glm::vec3 PlayerSimState::climbWallNormal {0.0f}

Normal of the wall being climbed.

◆ coyoteTimer

float PlayerSimState::coyoteTimer {0.0f}

Remaining grace time after leaving ground/wall (s).

◆ exitClimbTimer

float PlayerSimState::exitClimbTimer {0.0f}

◆ exitingLedge

bool PlayerSimState::exitingLedge {false}

◆ exitLedgeTimer

float PlayerSimState::exitLedgeTimer {0.0f}

◆ exitWallTimer

float PlayerSimState::exitWallTimer {0.0f}

Remaining exit-wall grace time (s).

◆ grappleCooldownActive

bool PlayerSimState::grappleCooldownActive {false}

True during cooldown between uses.

◆ grappleCooldownTimer

float PlayerSimState::grappleCooldownTimer {0.0f}

Remaining cooldown time (s).

◆ grappleInputLastTick

bool PlayerSimState::grappleInputLastTick {false}

Edge detection on the grapple key.

◆ grapplePullDir

glm::vec3 PlayerSimState::grapplePullDir {0.0f}

Cached pull direction (toward anchor at fire time).

◆ grapplePullTimer

float PlayerSimState::grapplePullTimer {0.0f}

Time spent being pulled (s).

◆ groundedDuration

float PlayerSimState::groundedDuration {0.0f}

Time continuously grounded (s); resets on leaving ground.

Distinguishes fresh ground jumps (lurch-eligible) from bhop chain continuations.

◆ jumpCooldown

float PlayerSimState::jumpCooldown {0.0f}

Minimum time before double jump is available (s).

◆ jumpedThisTick

bool PlayerSimState::jumpedThisTick {false}

Set during the tick a jump occurs (for lurch setup).

◆ jumpHeldLastTick

bool PlayerSimState::jumpHeldLastTick {false}

Was jump key held on the previous tick (edge detection).

◆ jumpLurchEnabled

bool PlayerSimState::jumpLurchEnabled {false}

True during the lurch grace window after jumping.

◆ jumpLurchTimer

float PlayerSimState::jumpLurchTimer {0.0f}

Time elapsed since the jump that enabled lurch (s).

◆ ledgeHoldTimer

float PlayerSimState::ledgeHoldTimer {0.0f}

Time spent holding the ledge (s).

◆ ledgeNormal

glm::vec3 PlayerSimState::ledgeNormal {0.0f}

Wall normal at the ledge.

◆ ledgePoint

glm::vec3 PlayerSimState::ledgePoint {0.0f}

World-space position of the grabbed ledge.

◆ moveInputsOnJump

glm::vec2 PlayerSimState::moveInputsOnJump {0.0f}

WASD direction when jump started (for direction-change detection).

◆ slideBoostCooldown

float PlayerSimState::slideBoostCooldown {0.0f}

Remaining cooldown before next slide boost (s).

◆ slideFatigueCounter

int PlayerSimState::slideFatigueCounter {0}

Diminishing returns on consecutive slidehops.

◆ slideFatigueDecayAccum

int PlayerSimState::slideFatigueDecayAccum {0}

Tick accumulator for fatigue recovery.

◆ slideTimer

float PlayerSimState::slideTimer {0.0f}

How long the current slide has lasted (s).

◆ wallBlacklistActive

bool PlayerSimState::wallBlacklistActive {false}

◆ wallBlacklistHeight

float PlayerSimState::wallBlacklistHeight {-1e10f}

◆ wallBlacklistNormal

glm::vec3 PlayerSimState::wallBlacklistNormal {0.0f}

◆ wallForward

glm::vec3 PlayerSimState::wallForward {0.0f}

Direction of travel along the wall.

◆ wallJumpLocked

bool PlayerSimState::wallJumpLocked {false}

Wall-jump autobhop lock.

True when jump was already held at the moment the wallrun started (i.e. the player rolled into the run with jump continuously held from a bhop chain). Wall-jump and coyote-wall-jump are suppressed while this is true so the player doesn't instantly bounce off the wall. Cleared as soon as the jump key is released; the next press is then a genuine "I want to jump off" rising edge.

◆ wallNormal

glm::vec3 PlayerSimState::wallNormal {0.0f}

Normal of the wall being run on.

◆ wallRunSpeedTimer

float PlayerSimState::wallRunSpeedTimer {0.0f}

Timer for the speed-loss delay.

◆ wallRunTimer

float PlayerSimState::wallRunTimer {0.0f}

Time on current wall (s).

◆ wasClimbing

bool PlayerSimState::wasClimbing {false}

◆ wasGroundedLastTick

bool PlayerSimState::wasGroundedLastTick {false}

◆ wasWallRunning

bool PlayerSimState::wasWallRunning {false}

Set briefly after leaving wallrun (coyote wall jump).


The documentation for this struct was generated from the following file: