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

[TF2] Re-add stun effects for The Sandman (BONK! icon, conc stars, voicelines)

Open haaksirikko opened this issue 6 months ago • 5 comments

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

haaksirikko avatar May 12 '26 13:05 haaksirikko

Good for adding visual and audio recognition, sometimes I can't really tell if someone got hit by the ball or not.

antielectronbomb avatar May 13 '26 08:05 antielectronbomb

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~

haaksirikko avatar Jun 02 '26 08:06 haaksirikko

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

haaksirikko avatar Jun 16 '26 16:06 haaksirikko

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

haaksirikko avatar Jun 18 '26 10:06 haaksirikko

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

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.

FlaminSarge avatar Jun 19 '26 05:06 FlaminSarge

It'd be neat if the Scout's voice lines also played when you hit someone with the Wrap Assassin's bauble.

batbrain55 avatar Aug 28 '26 11:08 batbrain55

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.

haaksirikko avatar Aug 28 '26 16:08 haaksirikko

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.

SomeBloodyMinger avatar Sep 03 '26 12:09 SomeBloodyMinger