diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 23:46:58 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 23:46:58 +0100 |
| commit | a224cc451233a487a3d931954b125f6e1736e710 (patch) | |
| tree | 5cd1ed10848b6510ff92dccbe6f7b3cd5f7348f4 /CONTEXT.md | |
| parent | Charger juice: resolve per-class offsets (diff) | |
| download | hl2h-a224cc451233a487a3d931954b125f6e1736e710.tar.gz hl2h-a224cc451233a487a3d931954b125f6e1736e710.zip | |
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).
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 17 |
1 files changed, 14 insertions, 3 deletions
| @@ -744,9 +744,12 @@ vocabulary / decisions. | |||
| 744 | `m_DmgRadius` (`FIELD_FLOAT`) as fallback, then 300/200/150/300 for | 744 | `m_DmgRadius` (`FIELD_FLOAT`) as fallback, then 300/200/150/300 for |
| 745 | frag/RPG/AR2/bomb. | 745 | frag/RPG/AR2/bomb. |
| 746 | - Draws a small marker and a `FRAG 1.2s`-style label; the optional radius ring | 746 | - Draws a small marker and a `FRAG 1.2s`-style label; the optional radius ring |
| 747 | is a 24-segment horizontal circle projected at the projectile height, with | 747 | is a 36-segment horizontal circle projected at the projectile height, with |
| 748 | every segment near-plane/screen clipped independently, so it still draws | 748 | every segment near-plane/screen clipped independently, so it still draws |
| 749 | when the grenade itself is off-screen or behind the camera. | 749 | when the grenade itself is off-screen or behind the camera. Segments whose |
| 750 | clipped endpoint the engine overlay refuses fall back to the local | ||
| 751 | projection, which now uses the configured camera FOV (not a hardcoded 75°), | ||
| 752 | so the ring does not kink or drop pieces at wide FOVs. | ||
| 750 | Toggles: Fuse timer, Blast radius, Grenade trajectory | 753 | Toggles: Fuse timer, Blast radius, Grenade trajectory |
| 751 | (`[projectiles] trajectory=1`). | 754 | (`[projectiles] trajectory=1`). |
| 752 | - Grenade trajectory: while the frag weapon is active, simulate the throw | 755 | - Grenade trajectory: while the frag weapon is active, simulate the throw |
| @@ -757,7 +760,15 @@ vocabulary / decisions. | |||
| 757 | normal, and an upward normal with a slow vertical speed marks the landing. | 760 | normal, and an upward normal with a slow vertical speed marks the landing. |
| 758 | The polyline, landing cross and a 300-unit blast-radius ring at the landing | 761 | The polyline, landing cross and a 300-unit blast-radius ring at the landing |
| 759 | are drawn with the same near-plane-clipped projector as the radius ring. | 762 | are drawn with the same near-plane-clipped projector as the radius ring. |
| 760 | Verified on `:99` (the line arcs, bounces off a tunnel wall and lands). | 763 | The path keeps 512 points (one every other 20 ms step, up to 24 s), so it no |
| 764 | longer stops after ~2.5 s. Once a local frag has been thrown it is preferred | ||
| 765 | over the pre-throw estimate: `CBaseGrenade::m_hThrower` (server | ||
| 766 | `FIELD_EHANDLE`, with the client owner handles as fallback) identifies it, and | ||
| 767 | its live position/velocity seed the prediction. Bounces are still | ||
| 768 | approximate: the real frag is a VPhysics box with a random Y angular impulse | ||
| 769 | (`AngularImpulse(600, random(-1200,1200), 0)`), so contact points and | ||
| 770 | post-bounce paths differ between throws from the same spot. Verified on | ||
| 771 | `:99` (pre-throw arc + landing ring; the line now reaches the landing). | ||
| 761 | 772 | ||
| 762 | ## Roadmap / TODO | 773 | ## Roadmap / TODO |
| 763 | 774 | ||
