From a224cc451233a487a3d931954b125f6e1736e710 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 23:46:58 +0100 Subject: Grenade trajectory: actual grenade state, full-length path, rounder rings - Prefer the local player's thrown frag over the pre-throw estimate: resolve CBaseGrenade::m_hThrower from the server datamap (client owner handles as fallback), then seed the prediction from the live origin/velocity. The real frag is a spinning VPhysics box with a random Y angular impulse, so bounce points remain approximate; the doc now says so. - Keep 512 path points sampled every other 20 ms step (up to 24 s) instead of 127 points / ~2.5 s, so the line reaches the landing instead of stopping in mid-air. - Radius rings use 36 segments; a segment whose near-plane-clipped endpoint the engine overlay refuses falls back to the local projection, and that projection now uses the configured camera FOV instead of a hardcoded 75 degrees (the wide-FOV ring no longer kinks/drops pieces). --- CONTEXT.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index d0f89cb..54ca0b4 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -744,9 +744,12 @@ vocabulary / decisions. `m_DmgRadius` (`FIELD_FLOAT`) as fallback, then 300/200/150/300 for frag/RPG/AR2/bomb. - Draws a small marker and a `FRAG 1.2s`-style label; the optional radius ring - is a 24-segment horizontal circle projected at the projectile height, with + is a 36-segment horizontal circle projected at the projectile height, with every segment near-plane/screen clipped independently, so it still draws - when the grenade itself is off-screen or behind the camera. + when the grenade itself is off-screen or behind the camera. Segments whose + clipped endpoint the engine overlay refuses fall back to the local + projection, which now uses the configured camera FOV (not a hardcoded 75°), + so the ring does not kink or drop pieces at wide FOVs. Toggles: Fuse timer, Blast radius, Grenade trajectory (`[projectiles] trajectory=1`). - Grenade trajectory: while the frag weapon is active, simulate the throw @@ -757,7 +760,15 @@ vocabulary / decisions. normal, and an upward normal with a slow vertical speed marks the landing. The polyline, landing cross and a 300-unit blast-radius ring at the landing are drawn with the same near-plane-clipped projector as the radius ring. - Verified on `:99` (the line arcs, bounces off a tunnel wall and lands). + The path keeps 512 points (one every other 20 ms step, up to 24 s), so it no + longer stops after ~2.5 s. Once a local frag has been thrown it is preferred + over the pre-throw estimate: `CBaseGrenade::m_hThrower` (server + `FIELD_EHANDLE`, with the client owner handles as fallback) identifies it, and + its live position/velocity seed the prediction. Bounces are still + approximate: the real frag is a VPhysics box with a random Y angular impulse + (`AngularImpulse(600, random(-1200,1200), 0)`), so contact points and + post-bounce paths differ between throws from the same spot. Verified on + `:99` (pre-throw arc + landing ring; the line now reaches the landing). ## Roadmap / TODO -- cgit v1.2.3