group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PlayerVisState.hpp
Go to the documentation of this file.
1
26
27#pragma once
28
29#include "PlayerStateEnums.hpp"
30
31#include <glm/vec3.hpp>
32
39{
40 // Mode flags
43 int jumpCount{0};
44
45 // Boolean flags (un-packed in Phase 2; bit-packed in Phase 4).
46 bool isDead{false};
47 bool grounded{false};
48 bool crouching{false};
49 bool sprinting{false};
50 bool pendingUncrouch{false};
51 bool exitingWall{false};
52 bool exitingClimb{false};
53 bool grappleActive{false};
54
55 // Spatial state needed by client renderer/animator.
56 glm::vec3 groundNormal{0.0f, 1.0f, 0.0f};
57 glm::vec3 grapplePoint{0.0f};
58
59 // Camera effects (read by renderer).
60 float targetCameraTilt{0.0f};
61};
Locomotion mode + wall-side enums shared by PlayerVisState and PlayerSimState.
MoveMode
Movement mode — mutually exclusive locomotion states.
Definition PlayerStateEnums.hpp:17
@ OnFoot
Normal ground/air movement (walk, sprint, crouch, airborne).
Definition PlayerStateEnums.hpp:18
WallSide
Which side a wall is on relative to the player.
Definition PlayerStateEnums.hpp:27
@ None
Definition PlayerStateEnums.hpp:28
Replicated subset of player locomotion state.
Definition PlayerVisState.hpp:39
bool grappleActive
True while being pulled toward the grapple anchor.
Definition PlayerVisState.hpp:53
bool exitingClimb
Brief grace window after leaving a climb.
Definition PlayerVisState.hpp:52
MoveMode moveMode
Active locomotion mode.
Definition PlayerVisState.hpp:41
glm::vec3 grapplePoint
World-space anchor; renderer draws the cable to here.
Definition PlayerVisState.hpp:57
bool grounded
True when touching a floor surface this tick.
Definition PlayerVisState.hpp:47
int jumpCount
0 = on ground, 1 = first jump, 2 = double jumped.
Definition PlayerVisState.hpp:43
bool sprinting
True when sprint is active.
Definition PlayerVisState.hpp:49
WallSide wallRunSide
Wall side during WallRunning mode.
Definition PlayerVisState.hpp:42
bool exitingWall
Brief grace window after leaving a wall.
Definition PlayerVisState.hpp:51
bool isDead
True while the player is dead and waiting to respawn.
Definition PlayerVisState.hpp:46
bool crouching
True when crouch input is held.
Definition PlayerVisState.hpp:48
glm::vec3 groundNormal
Normal of the floor surface for foot orientation.
Definition PlayerVisState.hpp:56
bool pendingUncrouch
Deferred uncrouch (e.g. after slidehop); applied when safe.
Definition PlayerVisState.hpp:50
float targetCameraTilt
Target camera roll for wallrun lean (degrees).
Definition PlayerVisState.hpp:60