group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HitboxHistory.hpp
Go to the documentation of this file.
1
22
23#pragma once
24
27
28#include <array>
29#include <cstddef>
30#include <cstdint>
31#include <vector>
32
41{
42 uint32_t tick = 0;
43 std::vector<WorldCapsule> capsules;
44
54};
55
66{
72 static constexpr std::size_t k_capacity = 64;
73
74 std::array<HitboxHistorySample, k_capacity> ring{};
75
77 std::size_t head = 0;
78
82 std::size_t count = 0;
83};
PR-27 — per-entity animation state snapshot, decoupled from CharacterAnimator.
Skeleton-driven hitbox types: body regions, capsule definitions, damage profiles, and per-entity runt...
Snapshot of an entity's full animation state at one instant.
Definition AnimSnapshot.hpp:73
Per-tick capsule snapshot stored in the history ring.
Definition HitboxHistory.hpp:41
uint32_t tick
Server tick when the sample was recorded. 0 = unset.
Definition HitboxHistory.hpp:42
AnimSnapshot anim
PR-27: animation-state snapshot captured the same tick.
Definition HitboxHistory.hpp:53
std::vector< WorldCapsule > capsules
Definition HitboxHistory.hpp:43
Ring buffer of recent hitbox snapshots for one entity.
Definition HitboxHistory.hpp:66
static constexpr std::size_t k_capacity
Number of past samples retained per entity.
Definition HitboxHistory.hpp:72
std::size_t count
Number of samples written so far, capped at k_capacity.
Definition HitboxHistory.hpp:82
std::array< HitboxHistorySample, k_capacity > ring
Definition HitboxHistory.hpp:74
std::size_t head
Index where the next push lands. Wraps modulo k_capacity.
Definition HitboxHistory.hpp:77