Skip to content

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

Open
haaksirikko wants to merge 1 commit into
ValveSoftware:masterfrom
haaksirikko:sandman-effects
Open

[TF2] Re-add stun effects for The Sandman (BONK! icon, conc stars, voicelines)#1919
haaksirikko wants to merge 1 commit into
ValveSoftware:masterfrom
haaksirikko:sandman-effects

Conversation

@haaksirikko

Copy link
Copy Markdown

Description

Restores the effects (BONK! icon, conc stars, voicelines) of the Sandman that made it iconic without changing the weapon's functionality otherwise.

Adds a new stun flag TF_STUN_STUNBALL for this functionality. (unsure if it is the best name for it)

Supersedes #984, fixes ValveSoftware/Source-1-Games#4467

Vanilla:

sandman-vanilla.mp4

This PR (attacker):

sandman-fix1.mp4

Victim:

8mb.video-oCL-eRaiWzry.mp4

@antielectronbomb

Copy link
Copy Markdown

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

@FlaminSarge FlaminSarge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?
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.

Comment on lines -735 to +741
int iStunFlags = ( bMax ) ? TF_STUN_SPECIAL_SOUND | TF_STUN_MOVEMENT : TF_STUN_SOUND | TF_STUN_MOVEMENT;
int iStunFlags = TF_STUN_MOVEMENT | TF_STUN_SOUND | TF_STUN_STUNBALL;
float flStunAmount = 0.5f;
float flStunDuration = Max( 2.f, tf_scout_stunball_base_duration.GetFloat() * flLifeTimeRatio );
if ( bMax )
{
flStunDuration += 1.0;
iStunFlags |= TF_STUN_SPECIAL_SOUND;

@FlaminSarge FlaminSarge Jun 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting for future readers that SPECIAL_SOUND fully overrides the regular sound in StunSound, so having both flags here won't be an issue.

@haaksirikko

haaksirikko commented Jun 2, 2026

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Author

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 haaksirikko requested a review from FlaminSarge June 16, 2026 16:56
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.

[TF2] Special voice-lines refuse to play upon getting stunned by the Sandman's ball

3 participants