23#include <glm/mat4x4.hpp>
24#include <glm/vec3.hpp>
25#include <initializer_list>
49 bool init(SDL_Window* window);
78 float& mouseSensitivity,
79 float& gamepadLookSensitivity,
81 bool& renderSeparateFromPhysics,
82 bool& inputSyncedWithPhysics,
83 bool& limitFPSToMonitor,
138 const glm::mat4& viewProj,
153 const glm::mat4& viewProj,
204 void buildKillzoneUI(
const Registry& registry,
const glm::mat4& viewProj,
float screenWidth,
float screenHeight);
235 std::array<ShotDebugPair, k_shotRingMax>
shotRing{};
268 void buildShotDebugUI(
const glm::mat4& viewProj,
float screenWidth,
float screenHeight);
296 void buildContactDebugUI(
const glm::mat4& viewProj,
float screenWidth,
float screenHeight);
353 void buildDebugMenu(std::initializer_list<ExternalPanel> externalPanels);
405 float& mouseSensitivity,
406 float& gamepadLookSensitivity,
408 bool& renderSeparateFromPhysics,
409 bool& inputSyncedWithPhysics,
410 bool& limitFPSToMonitor,
Skeleton-driven hitbox types: body regions, capsule definitions, damage profiles, and per-entity runt...
Shared definitions for match status and state synchronization between server and clients.
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
Wire-format types for the PR-20 lag-comp shot debug visualizer.
Swept AABB and sphere collision queries against world geometry.
Forward-declared to avoid pulling in heavy particle headers.
Definition DebugUI.hpp:44
bool showCollisionShape
Show CollisionShape half-extents row.
Definition DebugUI.hpp:391
bool drawCollisionSpheres
Definition DebugUI.hpp:275
void toggleDebugMenu()
Toggle the unified debug menu on/off.
Definition DebugUI.cpp:142
bool consumePhysicsCsvRecordingRequest(bool &enabled) noexcept
Consume a start/stop request from the physics CSV button.
Definition DebugUI.cpp:147
bool drawContactSphereDepen
Definition DebugUI.hpp:312
void buildMovementChart(const Registry ®istry)
Draw the standalone 2-D overhead movement chart window.
Definition DebugUI.cpp:518
void buildWeaponSpawnerUI(const Registry ®istry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Weapon Spawner Debug window and (optionally) wireframe overlay for all weapon spawner entiti...
Definition DebugUI.cpp:2196
int bhopHistoryFill_
Samples collected so far (up to k_bhopHistorySize).
Definition DebugUI.hpp:437
bool drawHitboxOverlay
Draw 3-D capsule wireframes (independent of window visibility).
Definition DebugUI.hpp:143
bool drawContactBoxSweep
Definition DebugUI.hpp:303
bool drawContactTriMeshDepen
Definition DebugUI.hpp:313
void processEvent(const SDL_Event *event)
Forward an SDL event to the ImGui input backend.
Definition DebugUI.cpp:130
bool drawCollisionBrushes
Definition DebugUI.hpp:273
bool showContactDebugWindow
Show the Contact Debug ImGui window.
Definition DebugUI.hpp:298
bool drawCollisionBoxes
Definition DebugUI.hpp:272
int shotDebugVisibleCount
Slider value: how many of the most-recent shots to render (1-k_shotRingMax).
Definition DebugUI.hpp:245
bool drawShotDebugOverlay
Definition DebugUI.hpp:241
bool drawContactBrushDepen
Definition DebugUI.hpp:310
void buildShotDebugUI(const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Build the Shot Debug ImGui window + 3D overlay.
Definition DebugUI.cpp:2754
void buildSpawnPointUI(const Registry ®istry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Spawn Point Debug window and (optionally) overlay markers for all player respawn point entit...
Definition DebugUI.cpp:2398
bool drawSpawnPointOverlay
Draw spawn point markers (independent of window visibility).
Definition DebugUI.hpp:196
bool drawDroppedWeaponOverlay
Draw dropped weapon wireframes (independent of window visibility).
Definition DebugUI.hpp:184
void buildBhopAnalyzer(const Registry ®istry)
Draw the bhop analyzer window.
Definition DebugUI.cpp:700
bool drawContactTriMeshSweep
Definition DebugUI.hpp:307
int shotRingHead
Next-write slot.
Definition DebugUI.hpp:236
void buildDroppedWeaponUI(const Registry ®istry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Dropped Weapon Debug window and (optionally) wireframe overlay for all dropped weapon entiti...
Definition DebugUI.cpp:2318
bool pendingAmmoRefill_
Set by Weapon HUD button, consumed by Game::iterate().
Definition DebugUI.hpp:363
void buildUI(const Registry ®istry, int tickCount, float &mouseSensitivity, float &gamepadLookSensitivity, systems::GamepadAimAssistConfig &aimAssistCfg, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
Build the ECS inspector window contents.
Definition DebugUI.cpp:218
bool showWeaponHud
Show the Weapon HUD debug window (disabled by default).
Definition DebugUI.hpp:373
bool showInputSnapshot
Show InputSnapshot key-state row.
Definition DebugUI.hpp:393
bool drawContactSphereSweep
Definition DebugUI.hpp:306
int shotDebugSelectIdx
1-based index into the ring (1 = newest) to highlight.
Definition DebugUI.hpp:248
bool showSpawnPointWindow
Show the Spawn Point Debug ImGui window.
Definition DebugUI.hpp:195
void buildDebugMenu(std::initializer_list< ExternalPanel > externalPanels)
Definition DebugUI.cpp:156
bool showWeaponSpawnerWindow
Show the Weapon Spawner Debug ImGui window.
Definition DebugUI.hpp:170
float energyTeslaGuideDist_
Definition DebugUI.hpp:445
void newFrame()
Begin a new ImGui frame. Call before any ImGui draw calls.
Definition DebugUI.cpp:135
float energyTeslaEndpointRight_
Definition DebugUI.hpp:447
bool drawCollisionTriMeshes
Definition DebugUI.hpp:276
static constexpr int k_shotRingMax
Definition DebugUI.hpp:234
void buildInspectorContents(const Registry ®istry, int tickCount, float &mouseSensitivity, float &gamepadLookSensitivity, systems::GamepadAimAssistConfig &aimAssistCfg, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
Draw the body of the ECS Inspector window (everything after ImGui::Begin).
Definition DebugUI.cpp:273
bool drawContactOverlay
Draw contact-point + normal overlay in 3D.
Definition DebugUI.hpp:299
void buildNetworkUI(const NetworkStats &stats)
Build the Network Stats window showing ping, bandwidth, and update rate.
Definition DebugUI.cpp:1063
int getSimulatedLossPercent() const noexcept
The current packet-loss setting (0–50 %).
Definition DebugUI.hpp:122
bool bhopHasPrevSample_
Definition DebugUI.hpp:439
bool drawKillzoneOverlay
Draw killzone trigger boxes (independent of window visibility).
Definition DebugUI.hpp:207
bool showDroppedWeaponWindow
Show the Dropped Weapon Debug ImGui window.
Definition DebugUI.hpp:183
bool showNetworkSim
Show the Network Simulator (latency + loss) window.
Definition DebugUI.hpp:372
bool showPosition
Per-component visibility toggles — persistent across frames.
Definition DebugUI.hpp:388
bool drawContactCylinderSweep
Definition DebugUI.hpp:305
int shotRingCount
Live entries; saturates at k_shotRingMax.
Definition DebugUI.hpp:237
bool showVelocity
Show Velocity component row.
Definition DebugUI.hpp:390
bool pendingPhysicsCsvRecordingRequest_
Definition DebugUI.hpp:375
bool drawContactBoxDepen
Definition DebugUI.hpp:309
bool showParticleWindow_
Definition DebugUI.hpp:450
int simulatedLatencyMs_
Phase 6 testing: simulated round-trip latency in ms.
Definition DebugUI.hpp:381
bool showViewAngles
Show yaw/pitch/roll in degrees (easier to read than radians).
Definition DebugUI.hpp:394
float bhopGainHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:433
bool drawContactCylinderDepen
Definition DebugUI.hpp:311
void shutdown()
Destroy the ImGui context and shut down the SDL3 input backend.
Definition DebugUI.cpp:125
void buildNetworkSimUI()
Build the Network Simulator window with sliders to add fake round-trip latency and packet loss.
Definition DebugUI.cpp:1105
int simulatedLossPct_
Phase 6 testing: simulated UDP packet loss in percent.
Definition DebugUI.hpp:385
bool init(SDL_Window *window)
Create the ImGui context and initialise the SDL3 input backend.
Definition DebugUI.cpp:118
bool showKillzoneWindow
Show the Killzone Debug ImGui window.
Definition DebugUI.hpp:206
void buildWeaponUI(const Registry ®istry)
Definition DebugUI.cpp:1200
int bhopHistoryIdx_
Next write slot in the ring buffers.
Definition DebugUI.hpp:436
bool showMovementChart
Show the 2-D overhead movement chart window.
Definition DebugUI.hpp:395
int getSimulatedLatencyMs() const noexcept
The current latency-simulator setting in milliseconds (0–200).
Definition DebugUI.hpp:118
void buildCollisionUI(const physics::WorldGeometry &world, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Collision Debug window and (optionally) wireframe overlay for all world collision primitives...
Definition DebugUI.cpp:1775
float energyTeslaPreviewLockStrength_
Definition DebugUI.hpp:449
bool showHitboxWindow
Show the Hitbox Debug ImGui window.
Definition DebugUI.hpp:142
bool showShotDebugWindow
Show the Shot Debug panel + 3D overlay (CSGO sv_showimpacts).
Definition DebugUI.hpp:240
bool showCollisionWindow
Show the Collision Debug ImGui window.
Definition DebugUI.hpp:157
float bhopPrevHSpeed_
Previous frame's horizontal speed (for gain calc).
Definition DebugUI.hpp:438
bool showNetworkStats
Show the Network Stats window.
Definition DebugUI.hpp:371
bool showBhopAnalyzer
Show the bhop analyzer (player-relative + gain/sync).
Definition DebugUI.hpp:396
bool showDebugMenu
Master toggle for the unified debug menu window.
Definition DebugUI.hpp:355
void render()
Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame().
Definition DebugUI.cpp:2893
float contactPointRadius
Radius (px) of the contact-point circle in screen space.
Definition DebugUI.hpp:321
void buildHitboxUI(const Registry ®istry, HitboxRig &hitboxRig, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Hitbox Debug window and (optionally) capsule wireframe overlay.
Definition DebugUI.cpp:1455
bool bhopGainingHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:435
float energyTeslaEndpointForward_
Definition DebugUI.hpp:446
void buildContactDebugUI(const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Contact Debug window + (optionally) per-contact overlay.
Definition DebugUI.cpp:2045
std::array< ShotDebugPair, k_shotRingMax > shotRing
Definition DebugUI.hpp:235
bool drawMeshEdgeOverlay
Draw the per-trimesh welded-edge overlay: each triangle edge is coloured green when active (real boun...
Definition DebugUI.hpp:327
void buildKillzoneUI(const Registry ®istry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
Draw the Killzone Debug window and (optionally) trigger-volume overlay.
Definition DebugUI.cpp:2506
float contactNormalLength
World units of arrow length for unit-normal contacts.
Definition DebugUI.hpp:318
float energyTeslaEndpointUp_
Definition DebugUI.hpp:448
bool drawCollisionCylinders
Definition DebugUI.hpp:274
bool drawMeshVertexOverlay
Optional vertex markers on welded-edge overlay (active = green dot).
Definition DebugUI.hpp:330
void pushServerShot(const net::shotdebug::ShotDebugCapture &cap)
Append a server-reported rewind snapshot.
Definition DebugUI.cpp:2739
bool drawContactBrushSweep
Definition DebugUI.hpp:304
static constexpr int k_bhopHistorySize
Definition DebugUI.hpp:431
int shotDebugViewMode
Which side(s) to render in the 3D overlay.
Definition DebugUI.hpp:254
bool energyTeslaPreviewLive_
Definition DebugUI.hpp:443
bool drawContactPlaneDepen
Definition DebugUI.hpp:308
bool pendingAbilityLevelGrant_
Set by Weapon HUD button, consumed by Game::iterate().
Definition DebugUI.hpp:364
bool energyTeslaPreviewLocked_
Definition DebugUI.hpp:444
bool drawContactPlaneSweep
Definition DebugUI.hpp:302
float particleSpawnDist_
Units ahead of camera to spawn effects.
Definition DebugUI.hpp:442
bool showInspector
Per-window visibility toggles — persistent across frames.
Definition DebugUI.hpp:370
std::int8_t pendingSetSecondaryWeapon_
Mirror for the secondary slot.
Definition DebugUI.hpp:366
float bhopSpeedHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:432
bool bhopAirborneHistory_[k_bhopHistorySize]
Definition DebugUI.hpp:434
bool showPrevPosition
Show PreviousPosition component row.
Definition DebugUI.hpp:389
std::int8_t pendingSetPrimaryWeapon_
-1 = none; else WeaponType ordinal. Consumed by Game::iterate().
Definition DebugUI.hpp:365
bool showPlayerState
Show PlayerState flags row.
Definition DebugUI.hpp:392
void buildParticleUI(ParticleSystem &ps, glm::vec3 eyePos, glm::vec3 forward)
Build the Particle System debug/control window.
Definition DebugUI.cpp:905
bool drawCollisionOverlay
Draw world collision wireframes (independent of window visibility).
Definition DebugUI.hpp:158
void pushClientShot(const net::shotdebug::ShotDebugCapture &cap)
Append a fire-time snapshot the local client just took.
Definition DebugUI.cpp:2723
bool drawCollisionPlanes
Definition DebugUI.hpp:271
bool drawWeaponSpawnerOverlay
Draw weapon spawner wireframes (independent of window visibility).
Definition DebugUI.hpp:171
bool pendingPhysicsCsvRecordingEnabled_
Definition DebugUI.hpp:376
Top-level particle system orchestrator.
Definition ParticleSystem.hpp:39
Client-only input sampling system — split into two halves so mouse look can run every iterate() (smoo...
Definition DebugUI.hpp:15
Build the unified debug menu window.
Definition DebugUI.hpp:349
const char * name
Display name shown as checkbox label.
Definition DebugUI.hpp:350
bool * visible
Pointer to the visibility flag.
Definition DebugUI.hpp:351
Definition DebugUI.hpp:227
net::shotdebug::ShotDebugCapture clientView
Definition DebugUI.hpp:231
std::uint32_t shotInputTick
Definition DebugUI.hpp:228
bool hasServer
Definition DebugUI.hpp:230
net::shotdebug::ShotDebugCapture serverView
Definition DebugUI.hpp:232
bool hasClient
Definition DebugUI.hpp:229
Hitbox rig (shared per character archetype).
Definition Hitbox.hpp:159
Live network statistics updated each frame.
Definition Client.hpp:45
Server-side runtime capture of one shot's debug data, produced by WeaponSystem::handleFire and consum...
Definition ShotDebugReport.hpp:111
All world collision geometry for one tick.
Definition SweptCollision.hpp:225
Tunable parameters for gamepad aim assist.
Definition GamepadAimAssistSystem.hpp:71