[TF2] Fix fish/arm/slap messages not reflecting feigned deaths #1668
+18
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In TF2, if a Spy activates the Dead Ringer and is hit by the Holy Mackerel, Unarmed Combat, or Hot Hand, these weapons' hit counter messages ("x1"/"x2"/etc.) will get added to the killfeed rather than their kill messages ("FISH/ARM/SLAP KILL!"). This is an issue because it can give away to a player when a Spy is feigning their death.
The reason this occurs is because although these weapons' death notices are set to use their kill messages instead of their hit messages for feigned deaths (see here), these death notices only assume they correspond to a feigned death if
CTFPlayer::IsGoingFeignDeath(i.e.m_bGoingFeignDeathinCTFPlayer) is true when the notice is run. This PR fixes this by briefly settingm_bGoingFeignDeathto true when these death notices are posted for Spies feigning their deaths.Screenshots
Both screenshots are taken after hitting a Spy with their Dead Ringer active with the Holy Mackerel.
Without this PR:
With this PR:
This resolves ValveSoftware/Source-1-Games#7456.