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

[TF2] Fix issue where flaming friendly Snipers causes flame sfx when they're not actively using a bow #951

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndrewBetson
Copy link
Contributor

@AndrewBetson AndrewBetson commented Mar 5, 2025

Description

This happens because the CTFFlameManager::OnCollide and CTFFlameEntity::OnCollideWithTeammate functions only early-exit if the flame collides with a teammate that isn't a Sniper, and not when it collides with a teammate that is a Sniper but isn't actively using a bow weapon.

This causes friendly, non-bow-wielding Snipers to still be added to the m_mapEntitiesBurnt and m_hEntitiesBurnt vectors of each class, at least one of which which is used... somewhere -- admittedly I didn't dig terribly deep into where exactly this occurs -- to play sound effects that convey to the player that they are flaming a flame-able entity.

This PR fixes this by simply early-exiting in each of these functions if the flamed player is a Sniper but isn't actively using a bow weapon.

Before:

before.mp4

After:

after.mp4

@AndrewBetson AndrewBetson changed the title Fix issue where flaming friendly Snipers causes flame sfx when they're not actively using a bow [TF2] Fix issue where flaming friendly Snipers causes flame sfx when they're not actively using a bow Mar 5, 2025
Bitl added a commit to BitlDevelopmentStudios/source-sdk-2013-bds-base that referenced this pull request Mar 9, 2025
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.

1 participant