[TF2] Re-add stun effects for The Sandman (BONK! icon, conc stars, voicelines)#1919
[TF2] Re-add stun effects for The Sandman (BONK! icon, conc stars, voicelines)#1919haaksirikko wants to merge 2 commits into
Conversation
|
Good for adding visual and audio recognition, sometimes I can't really tell if someone got hit by the ball or not. |
6e68bb4 to
e16d5d1
Compare
FlaminSarge
left a comment
There was a problem hiding this comment.
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.
| 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; |
There was a problem hiding this comment.
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.
Did cleanup of stun flag checking in StunPlayer.
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 |
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_STUNBALLfor 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