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

Debug: hit detection snapshot (for client-server mismatch debugging). More...

#include <Hitbox.hpp>

Public Attributes

uint32_t tick = 0
 Tick when the shot was fired.
glm::vec3 shooterEye {0.0f}
 Ray origin.
glm::vec3 shooterDir {0.0f}
 Ray direction.
glm::vec3 targetPos {0.0f}
 Target entity position at time of shot.
float targetYaw = 0.0f
 Target yaw at time of shot.
std::vector< WorldCapsuleclientCapsules
 Client-side hitbox state.
std::vector< WorldCapsuleserverCapsules
 Server-side state (filled on rejection).
BodyRegion clientHitRegion = BodyRegion::Count
 What the client thought it hit.
bool serverConfirmed = false
 True if server confirmed the hit.
bool serverRejected = false
 True if server rejected the hit.

Detailed Description

Debug: hit detection snapshot (for client-server mismatch debugging).

Snapshot captured on the client when a local hitscan detects a hit.

If the server later rejects this hit, the server's capsule state is filled in for side-by-side comparison in the debug UI.

Member Data Documentation

◆ clientCapsules

std::vector<WorldCapsule> HitDebugSnapshot::clientCapsules

Client-side hitbox state.

◆ clientHitRegion

BodyRegion HitDebugSnapshot::clientHitRegion = BodyRegion::Count

What the client thought it hit.

◆ serverCapsules

std::vector<WorldCapsule> HitDebugSnapshot::serverCapsules

Server-side state (filled on rejection).

◆ serverConfirmed

bool HitDebugSnapshot::serverConfirmed = false

True if server confirmed the hit.

◆ serverRejected

bool HitDebugSnapshot::serverRejected = false

True if server rejected the hit.

◆ shooterDir

glm::vec3 HitDebugSnapshot::shooterDir {0.0f}

Ray direction.

◆ shooterEye

glm::vec3 HitDebugSnapshot::shooterEye {0.0f}

Ray origin.

◆ targetPos

glm::vec3 HitDebugSnapshot::targetPos {0.0f}

Target entity position at time of shot.

◆ targetYaw

float HitDebugSnapshot::targetYaw = 0.0f

Target yaw at time of shot.

◆ tick

uint32_t HitDebugSnapshot::tick = 0

Tick when the shot was fired.


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