From 902507c1173a03a04fc49cfe421bc3c3fb49d8fb Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 15:32:26 +0100 Subject: 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. --- src/hl2h.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/hl2h.cpp') 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) { note_modified(cmd, flags, vel); } } - - if (spread_control_apply(cmd, ent)) - note_modified(cmd, flags, vel); } // --------------------------------------------------------------------------- -- cgit v1.2.3