Skip to content

[TF2 SDK] Extra footstep sounds play when walking after first spawn #1160

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

Open
Tkain opened this issue Mar 29, 2025 · 0 comments · May be fixed by #1161
Open

[TF2 SDK] Extra footstep sounds play when walking after first spawn #1160

Tkain opened this issue Mar 29, 2025 · 0 comments · May be fixed by #1161

Comments

@Tkain
Copy link
Contributor

Tkain commented Mar 29, 2025

On a freshly built copy of the TF2 SDK, after a player spawns into a map for the first time, more footstep sounds than usual will play when the player moves around. This can be seen in the following video:

footstep-bug.mp4

I was able to reproduce this bug fairly consistently by simply starting a new server and then choosing a team and class. Notably, the extra footstep sounds seem to go away after the "waiting for players" timer expires (and the player is reset).

In my testing, I've found that these extra footstep sounds are playing because of animation events triggered by the player entity on the client side. Normally, these animation events shouldn't be triggered because the client player is not marked as visible, which causes C_BaseAnimating::DoAnimationEvents to return before running animation events:

// If we're invisible, don't draw the muzzle flash
bool bIsInvisible = !IsVisible() && !IsViewModel() && !IsMenuModel();
if ( bIsInvisible && !clienttools->IsInRecordingMode() )
return;

However, after spawning for the first time, IsVisible() seems to return true, causing animation events like the footstep event to play anyway. Once the "waiting for players" timer expires and the player is respawned, IsVisible() seemingly returns false as normal.

I haven't tested mainline TF2 for this bug as thoroughly as the SDK, but I can't seem to reproduce this bug there.

@Tkain Tkain linked a pull request Mar 29, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant