Skip to content

[TF2] Fix multiple class menu related issues - #1991

Open
num-get wants to merge 1 commit into
ValveSoftware:masterfrom
num-get:class_menu_fix
Open

[TF2] Fix multiple class menu related issues#1991
num-get wants to merge 1 commit into
ValveSoftware:masterfrom
num-get:class_menu_fix

Conversation

@num-get

@num-get num-get commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Based on mastercoms implementation of class menu fix.
This PR addresses two issues regarding class selection menu. First is missing sound effect, second is facial animation not resetting at the start of the animation.

Before:

2026-08-03.22-34-42.mp4

After:

2026-08-03.22-40-27.mp4

In addition, Spy has faulty class_select.vcd which causes Spy to have choppy class select animation at the start. The .vcd will also cause Spy to repeatedly huffing his cigarette instead of playing his idle animation. After this PR is applied, the faulty .vcd will cause Spy to play idle animation for 0.1 second at the start of his class select animation.
In order to avoid all the issues listed above, this PR must be accompanied with .vcd fix. Valve will need to place class_select.vcd inside tf/scenes/player/spy/low and then rebuild scenes.image.

Edit: Restore missing facial animation where Spy blows the cigarette smoke.
class_select.zip

Before:

2026-08-03.22-49-10.mp4

After without .vcd fix:

2026-08-03.23-04-09.mp4

After with .vcd fix:

2026-08-04.20-11-41.mp4

Lastly, the class menu used to have spotlight that was absent since the MVM update. The player model looks much darker compared to how it was before 2012. The method to fix this was mentioned by ValveSoftware/Source-1-Games#4121
Valve needs to put this fixed classselection.res inside tf/resource/ui

classselection.zip

Before:
20260803231849_1
After:
Screenshot 2026-08-03 23-28-49

If all the suggestions are implemented, this related issue can be closed for good.
ValveSoftware/Source-1-Games#4121

@JoriKos

JoriKos commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

I think the Spy continually smoking his cigarette looks much more natural, the proposed fix looks quite awkward.

@num-get

num-get commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

I think the Spy continually smoking his cigarette looks much more natural, the proposed fix looks quite awkward.

The animation was like that before the MVM update and on console TF2. From what I understand, the class_select.vcd that handles the animation was broken since day 1 but it was unused up until 2012.

Edit: I double check the 2007 build of TF2. Apparently the class_select.vcd is in use for Spy, but the .vcd is broken in a different way.
Spy will play his class select animation once normally, play his idle animation for about 12 seconds as normal. After that, the animation will skip to the part where Spy taking off the cigarette from his mouth twice, and then loop his animation where he's repeatedly huffing his cigarette like current TF2. It's broken in a way that nobody will notice because nobody stares at the class menu that long.
Interestingly, 2007 build has additional facial animation where Spy blows the cigarette smoke out of his mouth which is absent in current TF2. I will add that to the .vcd file later.

@Chickenman456

Copy link
Copy Markdown

I've been waiting for a fix like this for years. Holding out hope this gets merged

@Pygargue00fr

Copy link
Copy Markdown

This NEEDS to be added to the game. Presentation is important and this had been bugging me for a decade.

@mastercoms

Copy link
Copy Markdown
Contributor

I am a bit unhappy about my fix to the class menu so far and wanted to do more work on it, which is why I didn't submit it yet. This PR is also missing the subsequent fixes to the class menu I had done, including stopping the select sounds when the class menu is closed.

@num-get

num-get commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

including stopping the select sounds when the class menu is closed.

I added an extra check to avoid that.

@mastercoms

Copy link
Copy Markdown
Contributor

Yes, but sounds that start while selecting a class, will continue playing after you select the class, causing errant foley sounds to play for up to a few seconds while in-game.

@num-get

num-get commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Yes, but sounds that start while selecting a class, will continue playing after you select the class, causing errant foley sounds to play for up to a few seconds while in-game.

Like I said, I added an extra check to avoid that.

@mastercoms

Copy link
Copy Markdown
Contributor

The check you do prevents playing new sounds to start playing when the class menu is closed, it does not stop already playing sounds.

@num-get

num-get commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

#1991 (comment)

I don't see the point.
https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/client/game_controls/basemodelpanel.cpp
The original 2007 class menu code didn't have any specific function to interrupt already played sound effect.

@JoriKos

JoriKos commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

It would be an improvement over what we used to have then. Don't see a reason to not have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants