Raised This Month: $32 Target: $400
 8% 

[TF2] tf_max_voice_speak_delay not existing


Post New Thread Reply   
 
Thread Tools Display Modes
HelpMe
Senior Member
Join Date: Jun 2013
Location: Home
Old 05-01-2018 , 03:26   Re: [TF2] tf_max_voice_speak_delay not existing
Reply With Quote #21

Quote:
Originally Posted by cheddar View Post
Could you elaborate or post a simple script example. Better yet could you paste a .sp file so we could use your plugin if it works?
Basically the script finds the convar from the game and forces what the value bounds should be.
HelpMe is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-01-2018 , 03:32   Re: [TF2] tf_max_voice_speak_delay not existing
Reply With Quote #22

Quote:
Originally Posted by HelpMe View Post
Basically the script finds the convar from the game and forces what the value bounds should be.
Quote:
Originally Posted by asherkin View Post
sm_cvar ignores all restrictions and limits
__________________
ddhoward is offline
Wormy
Senior Member
Join Date: Jan 2013
Location: 2fort
Old 07-25-2018 , 13:19   Re: [TF2] tf_max_voice_speak_delay not existing
Reply With Quote #23

Quote:
Originally Posted by HelpMe View Post
How do you compile this together? Would love a compile for Linux servers.
__________________

Last edited by Wormy; 07-25-2018 at 13:23.
Wormy is offline
Sappykun
Member
Join Date: Nov 2019
Old 10-17-2021 , 02:07   Re: [TF2] tf_max_voice_speak_delay not existing
Reply With Quote #24

Sort of an old topic, but since I'm getting more familiar with looking at the game's binary, I took a spin at patching this myself.

tf_max_voice_speak_delay still has an effect, but only at high values (like the default 1.5s delay). At lower values, it's mostly overshadowed by the anti-spam system. It works like this every time a vocalize command is made:

1) Initialize a counter (m_iVoiceSpamCounter).
2) If it's been 5 seconds since the player last entered a voice command, set this counter to 0.
3) If it's been less than 1 second after the last voice command, increment the counter.
4) Find the next time the player is allowed to vocalize based on either the length of the voice clip or tf_max_voice_speak_delay (whichever is lower).
5) Add 0.5 seconds to that time for each value in the counter.

This script should disable the spam detection (in the easiest way possible, by making sure we don't increment m_iVoiceSpamCounter). This plugin also removes the lower limit for tf_max_voice_speak_delay (thanks to SirDigby).
Like sigsegv mentioned in his extension, there seems to be a 0.3 second hard-coded delay somewhere else in the code that is still limiting voice commands. I couldn't find anything in CTFPlayer::CanSpeakVoiceCommand or CTFPlayer::NoteSpokeVoiceCommand, so maybe the command itself is being limited somewhere?
Attached Files
File Type: sp Get Plugin or Get Source (voicespampatch.sp - 126 views - 1.8 KB)
File Type: txt voicespampatch.txt (585 Bytes, 61 views)

Last edited by Sappykun; 10-17-2021 at 02:09.
Sappykun is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-17-2021 , 06:09   Re: [TF2] tf_max_voice_speak_delay not existing
Reply With Quote #25

Thread: [TF2] Enhanced voice command spam unlimiter
View Single Post

But offsets could be old, there have been few TF2 updates.
__________________
Do not Private Message @me
Bacardi is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 10-17-2021 , 07:47   Re: [TF2] tf_max_voice_speak_delay not existing
Reply With Quote #26

Quote:
Originally Posted by Sappykun View Post
Like sigsegv mentioned in his extension, there seems to be a 0.3 second hard-coded delay somewhere else in the code that is still limiting voice commands. I couldn't find anything in CTFPlayer::CanSpeakVoiceCommand or CTFPlayer::NoteSpokeVoiceCommand, so maybe the command itself is being limited somewhere?
CBaseMultiplayerPlayer::ShouldRunRateLimitedCommand(char*) is probably what you're running into.

CTFPlayer::SpeakConceptIfAllowed() may need to be patched to bypass IsSpeaking() as well.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode