Hide voice labels for cloaked enemy spies
When using voice chat, a sprite will appear above the player's head. Unfortunately, this does even when cloaked as a spy which obviously reveals your position. This PR changes that so the sprite does not appear for enemy spies that are cloaked.
In addition, the voice label now shows the disguised team's voice label for enemy spies.
Another problem is the color of the speech bubble - it reveals the Spy's real team. The color difference is big enough to notice.
Since C_TFPlayer::GetHeadLabelMaterial appears to run only on the client, I think something like this would work:
if (player is spy && he's enemy to localPlayer && he's disguised as enemy)
render his speech bubble in localPlayer's team's color
else
proceed as normal
If it doesn't already exist, it may be worth including a replicated server cvar for this to preserve the legacy behavior (and for that to also affect the "Player is typing" bubble if that gets merged). If the cvar does exist, additional values for changing the behavior back to legacy would be nice.
If it doesn't already exist, it may be worth including a replicated server cvar for this to preserve the legacy behavior (and for that to also affect the "Player is typing" bubble if that gets merged). If the cvar does exist, additional values for changing the behavior back to legacy would be nice.
Wrote a basic implementation here if ficool2 wishes to implement this
https://github.com/BitlDevelopmentStudios/source-sdk-2013-bds-base/commit/fa152bef573bb6291ae0316397c0d3d61bf93268
doing this is unnecessary for the "Player is typing" bubble as it has its own cvar