Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update player visibility when changing observer mode #1161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tkain
Copy link
Contributor

@Tkain Tkain commented Mar 29, 2025

Description

This PR changes C_BasePlayer::SetObserverMode to call UpdateVisibility() after updating the value of m_iObserverMode. This is because the value of m_iObserverMode can affect the visibility state calculated for the player (ex. the value of m_hRender) when UpdateVisibility() is called. Because this call is currently not made, a player's visibility state may reflect having a different observer mode than their current mode, which may cause visual discrepancies.

This PR resolves #1160. In particular, this is because this change means that the client player is properly marked as not visible when their observer mode is set to OBS_MODE_NONE upon spawning.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TF2 SDK] Extra footstep sounds play when walking after first spawn
1 participant