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.

Copy link
Copy Markdown
Contributor

@FlaminSarge FlaminSarge left a comment

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;
Copy link
Copy Markdown
Contributor

@FlaminSarge FlaminSarge Jun 1, 2026

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.

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