diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-28 12:50:11 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-28 12:50:11 +0100 |
| commit | 6618d19660c42f4a6ae48cdaec23324e6e79def1 (patch) | |
| tree | c4fb9f08c96f86c455a600e6862e43e53d0be6f1 /CONTEXT.md | |
| parent | Item ESP: make 0 = unlimited explicit and persistent (diff) | |
| download | hl2h-6618d19660c42f4a6ae48cdaec23324e6e79def1.tar.gz hl2h-6618d19660c42f4a6ae48cdaec23324e6e79def1.zip | |
Combat: fix silent-aim spread seed and lead projectiles
- Silent aim and triggerbot set IN_ATTACK after CInput::CreateMove, so the
minimal-spread seed was never applied to their shots. Re-apply
spread_control_apply after setting the attack button, then update the CRC.
- Crossbow bolts and RPG rockets are not hitscan. Lead the selected hitbox by
target velocity * travel time; the crossbow bolt also gets its 0.05 gravity
drop (30 u/s^2). Apply the same correction to the smooth aimbot.
- Document both paths in CONTEXT.
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -176,7 +176,10 @@ vocabulary / decisions. | |||
| 176 | - Silent aim: exact target angle written to `cmd->viewangles`, `IN_ATTACK`, | 176 | - Silent aim: exact target angle written to `cmd->viewangles`, `IN_ATTACK`, |
| 177 | then the rendered view is restored immediately **and** at | 177 | then the rendered view is restored immediately **and** at |
| 178 | `FRAME_RENDER_START`; `forwardmove`/`sidemove` are rewritten to preserve the | 178 | `FRAME_RENDER_START`; `forwardmove`/`sidemove` are rewritten to preserve the |
| 179 | world-space movement wish vector. | 179 | world-space movement wish vector. Because `IN_ATTACK` is set after |
| 180 | `CInput::CreateMove`, the minimal-spread seed is applied again in `do_move` | ||
| 181 | (same for triggerbot). Crossbow bolts and RPG rockets are led by target | ||
| 182 | velocity and travel time; the crossbow also gets its 0.05 gravity drop. | ||
| 180 | - ABH: on the landing/jump tick, face opposite the horizontal velocity with | 183 | - ABH: on the landing/jump tick, face opposite the horizontal velocity with |
| 181 | zero forward/side movement; HL2's jump speed-bound subtraction then | 184 | zero forward/side movement; HL2's jump speed-bound subtraction then |
| 182 | accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. | 185 | accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. |
| @@ -212,6 +215,8 @@ vocabulary / decisions. | |||
| 212 | `RandomSeed`/`RandomFloat`, the 8-bit seed whose | 215 | `RandomSeed`/`RandomFloat`, the 8-bit seed whose |
| 213 | `CShotManipulator::ApplySpread` offset is smallest. It sets | 216 | `CShotManipulator::ApplySpread` offset is smallest. It sets |
| 214 | `cmd->random_seed` on attack commands; `note_modified` repairs the CRC. | 217 | `cmd->random_seed` on attack commands; `note_modified` repairs the CRC. |
| 218 | Silent aim and triggerbot set `IN_ATTACK` after the CInput hook, so they | ||
| 219 | re-apply the best seed in `do_move`. | ||
| 215 | - Shotguns use consecutive seeds per pellet. The primary's first pellet is | 220 | - Shotguns use consecutive seeds per pellet. The primary's first pellet is |
| 216 | `FIRE_BULLETS_FIRST_SHOT_ACCURATE`, so the table excludes it; the secondary | 221 | `FIRE_BULLETS_FIRST_SHOT_ACCURATE`, so the table excludes it; the secondary |
| 217 | uses all 12. Separate best starting seeds are precomputed for 1, 8 and 12 | 222 | uses all 12. Separate best starting seeds are precomputed for 1, 8 and 12 |
