source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] Fix fish/arm/slap messages not reflecting feigned deaths

Open Tkain opened this issue 1 month ago • 0 comments

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_bGoingFeignDeath in CTFPlayer) is true when the notice is run. This PR fixes this by briefly setting m_bGoingFeignDeath to 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:

The Spy's death notice says "x1"

With this PR:

The Spy's death notice says "FISH KILL!"

This resolves https://github.com/ValveSoftware/Source-1-Games/issues/7456.

Tkain avatar Nov 22 '25 01:11 Tkain