group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PlayerVisState.hpp File Reference

Visible / replicated half of the player locomotion state. More...

#include "PlayerStateEnums.hpp"
#include <glm/vec3.hpp>
Include dependency graph for PlayerVisState.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PlayerVisState
 Replicated subset of player locomotion state. More...

Detailed Description

Visible / replicated half of the player locomotion state.

The original PlayerState was ~272 bytes of mixed gameplay-visible state (grounded, sprinting, current move mode, camera tilt) and server-only bookkeeping (timer fields, blacklists, lurch grace windows, grapple cooldowns, slide fatigue counters). Phase 2 of the networking overhaul splits it cleanly so the server only ships the small "what does the renderer / animator / HUD need to see" half to clients.

Fields here are everything a remote viewer needs to:

  • pose the character animator (grounded / sprinting / crouching / moveMode / wallRunSide drive locomotion + special-mode states),
  • draw the grapple cable (grappleActive + grapplePoint),
  • compute camera roll for first-person wallrun lean (targetCameraTilt),
  • orient feet against the floor surface (groundNormal),
  • show the death state in the HUD / scoreboard (isDead).

Anything only the simulation needs to compute the next tick lives in PlayerSimState (server-only; mirrored on the owning client when Phase 5 prediction lands).

Note
Field-level bit-packing and quantization are deferred to Phase 4 (delta encoding). Today the struct is a flat ~64 bytes; even un-packed it is already a >4× reduction on what we used to ship per player.