Add typing bubble above players
There is an unused particle in TF2 named speech_typing, and it appears to have been forgotten about given no code for it ever existed. This PR restores it so it appears when the player has their chat box open, Would make for a nice quality-of-life improvement just like the existing voice chat bubbles above player heads.
https://github.com/user-attachments/assets/cf4d0fac-f541-4a75-be8e-83ed9a5d7eca
I'd recommend adding client-side convar that lets users disable it, TF2 is laggy already as it is, last thing we need is another particle above each player.
Other than that, are there going to be two speech bubbles if player is typing and using voice chat at same time?
It would also be nice to change it so that cloaked Spies aren't revealed to enemies with both this particle and the voice chat particle when alltalk is on, as long as that's in-scope for this request.
I'd recommend adding client-side convar that lets users disable it, TF2 is laggy already as it is, last thing we need is another particle above each player.
Other than that, are there going to be two speech bubbles if player is typing and using voice chat at same time?
Added tf_chat_particle convar and made the chat particle hidden when using voice in last commit
It would also be nice to change it so that cloaked Spies aren't revealed to enemies with both this particle and the voice chat particle when alltalk is on, as long as that's in-scope for this request.
I already made sure to account for this, I made a separate PR for the voice chat particle side of it (https://github.com/ValveSoftware/source-sdk-2013/pull/828)
Could this please be team-only? The VC icon is team-only (I get why), and I feel like it’d be better not to signal to the enemy team that you’re typing, since it just makes it easier for them to kill you. Without the icon, no one knew if someone was at a disadvantage for a second. Realistically this probably doesn’t matter much, but I still think it would be better if it were only visible to teammates. Sorry for the rambling... :fishsticks:
"You can still be killed if you're standing still while typing" - yes, I'm aware. However I type fast, so currently it doesn't really affect me or other people who type quickly. And the typing bubble appears in advance before someone even starts typing
Summary: Make the typing indicator team-only when "alltalk" is disabled.
I think the particle should only appear when the player is actively typing, rather than just having the chat box open. That way, it doesn't show up unnecessarily when someone is just checking chat history or has the chat open without typing anything.
Should the concommand shenanigans for activating/toggling this shiny new input be added to in_main? Competitive players might have fun tricking people with that if so
I re-implemented this PR in my fork as I felt the need to allocate an input bit to this functionality was unnecessary, as it isn't a key.
https://github.com/BitlDevelopmentStudios/source-sdk-2013-bds-base/commit/c25f464ea26c532393a9a7038ffb83ff855ecb94
changes done:
- m_bTyping is implemented in the base player classes, rather than tf_player. It is also a public networked variable used for the below context.
- m_bTyping is turned on or off depending on the situation in ClientModeShared::CreateMove
All other aspects are virtually the same, but it doesn't use an input bit for it. It should function the same way.
Replying to https://github.com/ValveSoftware/source-sdk-2013/pull/824#issuecomment-2702751590
Your implementation doesn't work in multiplayer, the client is not networking the typing state to the server (networkvars are one-way from server -> client)