[HL25] Weapon model desync when switching while +attack held
Description
There is a bug where the wrong weapon model is displayed both in the player's POV and on the player model for others after switching weapons while holding the +attack key. When switching between certain weapon combinations, the weapon viewmodel may disappear entirely and the player model will look as though it's holding nothing. Also, firing produces no sound in some weapon combinations, but this sound bug appears to be client-side only and doesn't affect other players.
Steps to Reproduce
- Equip a weapon (e.g., Gauss gun) and deplete all its ammo while holding the
+attackkey. - Without releasing the
+attackkey, switch to another weapon (e.g., Crowbar) using thelastinvcommand (or anyweapon_*command). - Switch back to the original weapon (e.g., Gauss gun) using the same command while still holding
+attack. - Obtain ammo while continuing to hold
+attack.
Expected Behavior
The correct weapon model should be displayed in the player's POV and on the player model.
Actual Behavior
- The viewmodel shows the incorrect weapon (e.g., Crowbar) even though the original weapon (e.g., Gauss gun) is equipped.
- The player model (as seen by other players) also appears to be holding the wrong weapon.
- When firing, the effects (e.g., Gauss gun beam) come from the incorrect weapon (e.g., Crowbar).
Additional Information
- OS: Windows 11 Pro x64, version 23H2, build 22631.4112
- Half-Life 1 Client (25th Anniversary): Exe build: 12:23:38 Dec 22 2023 (9920)
- This bug existed prior to the 25th Anniversary update and continues after it.
Video Demonstration
9Mmhandgun to Gauss (sound + weapon missing)
https://github.com/user-attachments/assets/4e0b8e17-a799-453d-b4cd-2f24e8829d83
357 to 9mmAR
https://github.com/user-attachments/assets/66fb3b39-5997-4305-a0e4-97da8fc748c9
Tripmine to Gauss
https://github.com/user-attachments/assets/ea608d43-69aa-4f8a-8367-2bbdde7755de