group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
net::shotdebug::ShotDebugCapture Struct Reference

Server-side runtime capture of one shot's debug data, produced by WeaponSystem::handleFire and consumed by ServerGame (which serialises into the wire form above and sends to the shooter via Server::enqueueTo). More...

#include <ShotDebugReport.hpp>

Classes

struct  Target
 Per in-range target's REWOUND capsule list at fire-time. More...

Public Attributes

std::uint16_t shooterClientId = 0
 The shooter's network ClientId.
std::uint32_t shotInputTick = 0
glm::vec3 origin {0.0f}
glm::vec3 direction {0.0f}
float range = 0.0f
std::uint16_t hitTargetClientId = k_missClientId
std::uint8_t hitRegion = 0
glm::vec3 hitPoint {0.0f}
std::vector< Targettargets

Detailed Description

Server-side runtime capture of one shot's debug data, produced by WeaponSystem::handleFire and consumed by ServerGame (which serialises into the wire form above and sends to the shooter via Server::enqueueTo).

Stays in shared code because the same WeaponSystem.cpp is built into both server and client TUs (client uses it for prediction); the client never populates the capture vector — runWeapon's output param defaults to null.

Member Data Documentation

◆ direction

glm::vec3 net::shotdebug::ShotDebugCapture::direction {0.0f}

◆ hitPoint

glm::vec3 net::shotdebug::ShotDebugCapture::hitPoint {0.0f}

◆ hitRegion

std::uint8_t net::shotdebug::ShotDebugCapture::hitRegion = 0

◆ hitTargetClientId

std::uint16_t net::shotdebug::ShotDebugCapture::hitTargetClientId = k_missClientId

◆ origin

glm::vec3 net::shotdebug::ShotDebugCapture::origin {0.0f}

◆ range

float net::shotdebug::ShotDebugCapture::range = 0.0f

◆ shooterClientId

std::uint16_t net::shotdebug::ShotDebugCapture::shooterClientId = 0

The shooter's network ClientId.

Used by ServerGame to address the unicast SHOT_DEBUG_REPORT packet.

◆ shotInputTick

std::uint32_t net::shotdebug::ShotDebugCapture::shotInputTick = 0

◆ targets

std::vector<Target> net::shotdebug::ShotDebugCapture::targets

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