[TF2] Re-add stun effects for The Sandman (BONK! icon, conc stars, voicelines)
Description
Restores the effects (BONK! icon, conc stars, voicelines) of the Sandman that made it iconic without changing the weapon's functionality otherwise.
Forces the effects to display/play on TF_STUN_SOUND. Reworked Bonk to use TF_STUN_DODGE_COOLDOWN which is reworked to only play the bonk sound effect with no other effects.
Supersedes #984, fixes https://github.com/ValveSoftware/Source-1-Games/issues/4467
Vanilla:
https://github.com/user-attachments/assets/0a6c0d9d-4898-4442-b840-756fe93e85bc
This PR (attacker):
https://github.com/user-attachments/assets/11bc39f0-ffa2-4477-a819-6249bc08b3f1
Victim:
https://github.com/user-attachments/assets/db97405b-288e-4b20-85be-fca679523fb2
Good for adding visual and audio recognition, sometimes I can't really tell if someone got hit by the ball or not.
Something seems clunky with the way stun flags are being used in general (not from this PR, but in existing logic). Might be worth trying to clean up/streamline?
Did cleanup of stun flag checking in StunPlayer.
Also, it might be worth piggybacking off of one of the other flags instead of adding a new flag e.g. TF_STUN_SOUND. That will cause it to appear after a Scout's drink wears off, but you could argue that's thematic.
Not sure if that's the way to go, although TF_STUN_SOUND is only used in the Bonk slowdown and Sandman so maybe it wouldn't matter much. In Bonk's case TF_STUN_NO_EFFECTS could be used to hide the effects. ~If I decide to proceed this way then the flag needs to be renamed to e.g. TF_STUN_EFFECTS~
Also, it might be worth piggybacking off of one of the other flags instead of adding a new flag
Come think of it, TF_STUN_DODGE_COOLDOWN is a flag that was used for the original Bonk's post-effect slowdown but has gone unused since its removal and its reintroduction in Jungle Inferno does not use the flag
Now the effects appear on TF_STUN_SOUND and Bonk has been reworked to use TF_STUN_DODGE_COOLDOWN, which is reworked to only play the bonk sound effect. Removed TF_STUN_STUNBALL
Now the effects appear on
TF_STUN_SOUNDand Bonk has been reworked to useTF_STUN_DODGE_COOLDOWN, which is reworked to only play the bonk sound effect. RemovedTF_STUN_STUNBALL
For clarity you can even add a new define TF_STUN_(whatever it should be named for the bonk effect) as #define TF_STUN_(new_value) TF_STUN_DODGE_COOLDOWN
Then it won't be confusing to read in code but will still use the unused value instead of making a new value.
It'd be neat if the Scout's voice lines also played when you hit someone with the Wrap Assassin's bauble.
Reworked again by using TF_STUN_DODGE_COOLDOWN as a new define TF_STUN_EFFECTS
It'd be neat if the Scout's voice lines also played when you hit someone with the Wrap Assassin's bauble.
Out of scope for this PR.
This is long overdue. The sandman at the least deserves its old iconic voice-lines and BONK! indicator. Both have basically been unheard of since the disastrous patch in Jungle Inferno; except, funnily enough, MvM when a Spy disguises as Scout and saps a robot. The modern sandman has no soul anymore.