|
group2 0.1.0
CSE 125 Group 2
|
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< WorldCapsule > | clientCapsules |
| Client-side hitbox state. | |
| std::vector< WorldCapsule > | serverCapsules |
| 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. | |
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.
| std::vector<WorldCapsule> HitDebugSnapshot::clientCapsules |
Client-side hitbox state.
| BodyRegion HitDebugSnapshot::clientHitRegion = BodyRegion::Count |
What the client thought it hit.
| std::vector<WorldCapsule> HitDebugSnapshot::serverCapsules |
Server-side state (filled on rejection).
| bool HitDebugSnapshot::serverConfirmed = false |
True if server confirmed the hit.
| bool HitDebugSnapshot::serverRejected = false |
True if server rejected the hit.
| glm::vec3 HitDebugSnapshot::shooterDir {0.0f} |
Ray direction.
| glm::vec3 HitDebugSnapshot::shooterEye {0.0f} |
Ray origin.
| glm::vec3 HitDebugSnapshot::targetPos {0.0f} |
Target entity position at time of shot.
| float HitDebugSnapshot::targetYaw = 0.0f |
Target yaw at time of shot.
| uint32_t HitDebugSnapshot::tick = 0 |
Tick when the shot was fired.