Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Voice: Reworked HUD #1473

Merged
merged 28 commits into from
May 19, 2024
Merged

Voice: Reworked HUD #1473

merged 28 commits into from
May 19, 2024

Conversation

TimGoll
Copy link
Member

@TimGoll TimGoll commented Mar 8, 2024

This doesn't do much besides creating a new UI in our HUD system instead of the weird stuff that was done before. It also adds a function that generates a fake voice spectrum.

image

Note: This voice spectrum is only visible for other players. Or if you have set voice_loopback 1 on the client. I'm not sure if there is any real solution to that, so I guess it is unfixable.

Stuff I want to add to voice (in other PRs):

  • indicator in the UI if this voice is locational or global, maybe a neat detective item would be for him to be able to talk globally, even if locational voice is turned on
  • right now there exists only push to talk, I'd like to add push to mute and auto detection as well
  • a neat UI for the battery drain state (that's something I removed in this PR, but I will add it back. I'm not sure if anyone is using that anyway)
  • clean up that cl_voice stuff, it looks like a mess

For the reviewers: Besides the new UI elements not much changed. I reordered some calls, renamed some variables (clrd, seriously? :D) and removed the old rendering code.

@TimGoll TimGoll added this to the v0.14.0b milestone Mar 9, 2024
@TimGoll TimGoll added the type/enhancement Enhancement or simple change to existing functionality label Mar 9, 2024
@TimGoll TimGoll marked this pull request as ready for review March 9, 2024 15:05
@TimGoll
Copy link
Member Author

TimGoll commented Mar 9, 2024

Feel free to review! But before it is merged, I have to test this on a multiplayer server. I'm pretty sure it works. But I have to confirm it.

@TimGoll
Copy link
Member Author

TimGoll commented Mar 16, 2024

Some updates from @mexikoedi's test session:

Hatten dabei folgende Fehler:

  • Voice Chat war komisch, da man nicht gesehen hat dass man geredet hat (man musste ständig fragen, ob man gehört wird) und die Namen haben nicht zu den Stimmen gepasst, z.B. wenn ich rede dann kommt bei manchen ein andere Name oben links und umgekehrt auch, war sehr verwirrend. Vielleicht funktioniert es mit Buben Voice Chat nicht richtig.
  • Ansonsten sah es schick aus (Voiceanzeige oben links) und wir haben sonst nichts komisches festgestellt.

Currently I have no idea how and why this could happen, I have to look into it more.

He also attached two pictures:
image
image

@TimGoll
Copy link
Member Author

TimGoll commented Mar 31, 2024

Voice Chat war komisch, da man nicht gesehen hat dass man geredet hat (man musste ständig fragen, ob man gehört wird) und die Namen haben nicht zu den Stimmen gepasst, z.B. wenn ich rede dann kommt bei manchen ein andere Name oben links und umgekehrt auch, war sehr verwirrend. Vielleicht funktioniert es mit Buben Voice Chat nicht richtig.

I'm unable to reproduce this @mexikoedi

Edit: Nevermind, found the issue and fixed it

@TimGoll
Copy link
Member Author

TimGoll commented Mar 31, 2024

This PR is now done from my POV

@Histalek Histalek added status/waiting Depends on another Pull Request to be merged before and removed status/waiting Depends on another Pull Request to be merged before labels Apr 7, 2024
@TimGoll
Copy link
Member Author

TimGoll commented Apr 12, 2024

I think everything is done now. However I'm unable to test it as I'm not at home for a while. Maybe @mexikoedi can give it a try?

@mexikoedi
Copy link
Contributor

I think everything is done now. However I'm unable to test it as I'm not at home for a while. Maybe @mexikoedi can give it a try?

So I tried it out with a friend and encountered multiple issues. I only had the voice branch active.
The issue which I reported previously seems to be fixed and we could talk normally during the testing.
Issues encountered:

[ttt2] Couldn't include file 'cl_voice.lua' - File not found or is empty (@addons/ttt2/gamemodes/terrortown/gamemode/shared/huds/pure_skin/cl_init.lua (line 83))
  1. unknown - addons/ttt2/gamemodes/terrortown/gamemode/shared/huds/pure_skin/cl_init.lua:83
   2. include - [C]:-1
    3. includeFoldersFiles - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_hud_module.lua:13
     4. unknown - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_hud_module.lua:117
      5. include - [C]:-1
       6. ttt_include - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_include.lua:217
        7. unknown - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_init.lua:602
         8. include - [C]:-1
          9. ttt_include - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_include.lua:217
           10. unknown - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_main.lua:22
            11. include - [C]:-1
             12. ttt_include - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_include.lua:217
              13. unknown - addons/ttt2/gamemodes/terrortown/gamemode/cl_init.lua:3
[ttt2] addons/ttt2/gamemodes/terrortown/gamemode/client/cl_voice.lua:72: attempt to call method 'SetSpeakingInVoice' (a nil value)
  1. fn - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_voice.lua:72
   2. Run - lua/ulib/shared/hook.lua:109
    3. unknown - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_main.lua:235
[ttt2] addons/ttt2/gamemodes/terrortown/gamemode/client/cl_voice.lua:360: attempt to call method 'SetVoiceColor' (a nil value)
  1. unknown - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_voice.lua:360
  • Everyone had the the color "grey" only the color of oneself is correct. (If you are in the Traitor team then you see the correct color of your mate.)
  • No audio visualization when I'm talking. I only see the audio visualization of the other players.

@TimGoll
Copy link
Member Author

TimGoll commented Apr 14, 2024

No audio visualization when I'm talking. I only see the audio visualization of the other players.

That's a gmod limitation that I can't do anything about. If you set voice_loopback 1 then you'll hear yourself and are able to see the visualization. I'm therefore not sure if I should add the voice element for yourself at all.

The other error is strange. But I can't say much without debugging. There's probably an error somewhere that prevents the file from being loaded

TimGoll and others added 2 commits April 15, 2024 09:50
Co-authored-by: ruby0b <106119328+ruby0b@users.noreply.github.com>
@TimGoll
Copy link
Member Author

TimGoll commented Apr 20, 2024

@mexikoedi Fixed the issue, should work now.

@mexikoedi
Copy link
Contributor

I tested it again and it seemed that all the issues which I reported were resolved.

@TimGoll TimGoll requested a review from saibotk April 25, 2024 18:45
Copy link
Member

@saibotk saibotk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only that small comment about the color, but not blocking :)

Otherwise good to go, sorry this took so long!

@TimGoll TimGoll merged commit af4aef4 into master May 19, 2024
4 checks passed
@TimGoll TimGoll deleted the voice-UI branch May 19, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement or simple change to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants