diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 15:22:19 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 15:22:19 +0100 |
| commit | 27c9ad766e1b1333922b4c14cbde9d9b77c8dab0 (patch) | |
| tree | 7c758c0d431a389cc3826495b4c6d20ca28c6530 /src/studio.cpp | |
| parent | Melee killbot: 360-degree crowbar silent aim (diff) | |
| download | hl2h-27c9ad766e1b1333922b4c14cbde9d9b77c8dab0.tar.gz hl2h-27c9ad766e1b1333922b4c14cbde9d9b77c8dab0.zip | |
Spread control: client-seed no-spread
HL2's CBaseEntity::FireBullets seeds its RNG from the usercmd random_seed
(m_bUseServerRandomSeed is false for HL2 weapons), so the client can select the
8-bit seed that puts CShotManipulator::ApplySpread closest to the center.
- New feature Spread control -> Active / No spread (both default on).
- Precompute the best seed for a single shot and for the shotgun's 8-shot
primary (first pellet accurate) and 12-shot secondary windows using the
engine's own RandomSeed/RandomFloat from libvstdlib.
- Set cmd->random_seed on attack commands; note_modified repairs the CRC.
- The random cone offset is neutralized, but the cone size, the pistol
accuracy penalty, server view punch and any damage falloff remain
server-side; stock HL2 has no distance damage falloff.
Diffstat (limited to 'src/studio.cpp')
0 files changed, 0 insertions, 0 deletions
