summaryrefslogtreecommitdiffstats
path: root/src/hl2h.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 15:32:26 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 15:32:26 +0100
commit902507c1173a03a04fc49cfe421bc3c3fb49d8fb (patch)
tree433cae8017464b2fb8f7ed92be8d894db521be38 /src/hl2h.cpp
parentSpread control: client-seed no-spread (diff)
downloadhl2h-902507c1173a03a04fc49cfe421bc3c3fb49d8fb.tar.gz
hl2h-902507c1173a03a04fc49cfe421bc3c3fb49d8fb.zip
Spread control: set random_seed after CInput::CreateMove
CInput::CreateMove overwrites cmd->random_seed with MD5_PseudoRandom after CHLClient::CreateMove returns, so the seed set from the client-mode hook was being discarded. Hook the IInput vtable slot 3 (CInput::CreateMove), call the original, then apply the spread seed and update the verified command copy and CRC. This also keeps all aim/movement edits since the original copies the command into the verified table.
Diffstat (limited to 'src/hl2h.cpp')
-rw-r--r--src/hl2h.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp
index dddcbdc..ee2e990 100644
--- a/src/hl2h.cpp
+++ b/src/hl2h.cpp
@@ -532,9 +532,6 @@ static void do_move(int seq, float frametime) {
532 note_modified(cmd, flags, vel); 532 note_modified(cmd, flags, vel);
533 } 533 }
534 } 534 }
535
536 if (spread_control_apply(cmd, ent))
537 note_modified(cmd, flags, vel);
538} 535}
539 536
540// --------------------------------------------------------------------------- 537// ---------------------------------------------------------------------------