cl_dll: ammo: fix WeaponList sprite not showing when FOV is at default#364
cl_dll: ammo: fix WeaponList sprite not showing when FOV is at default#364GLoOoccK wants to merge 5 commits into
Conversation
|
This PR fixes support for plugins such as the example below, which previously did not work: |
Thanks for providing the plugin. |
|
I noticed that in this plugin, changing the crosshair causes HUD elements to appear in spectator mode, but this bug existed even before that PR. Of course, this bug does not exist in the original CS 1.6 client. |
|
The SPEC green crosshair is now displayed correctly when spectating. Previously, it was not shown at all, regardless of whether the plugin was enabled or disabled. The dynamic crosshair is also properly hidden when not in first-person view. The behavior now closely matches the Steam client, at least in my testing. |
Draw()was unconditionally callingHideCrosshair()wheneverFOV > 40, wiping any sprite previously set viaWeaponList+CurWeapon. At the same time,MsgFunc_CurWeaponwas not managing the static sprite state, leavingm_hStaticSprset with stale data during normal gameplay.As a result, custom HUD sprites registered through this message pair were only visible when the player's FOV dropped to <= 40 (e.g. during AWP zoom), since that was the only path where
HideCrosshair()was not called.Additionally,
MsgFunc_HideWeaponwas not handlingHIDEHUD_CROSSHAIR, so sendingHideWeaponwith that flag had no effect on the crosshair. The dynamic crosshair inDraw()was also not checkingHIDEHUD_CROSSHAIR, leaving it visible when it should have been hidden.#339