mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 07:11:38 +00:00
add check for recent saying counter not resetting
This commit is contained in:
parent
61f3c7be61
commit
a04cc4fd40
1 changed files with 9 additions and 1 deletions
|
@ -3887,13 +3887,21 @@ void AvHPlayer::ValidateClientMoveEvents()
|
|||
case ORDER_ACK:
|
||||
// If cheats
|
||||
if(GetGameRules()->GetCheatsEnabled()
|
||||
// OR It's less than the min saying interval, with less than 2 recent sayings, and they're not trying to say the same thing twice
|
||||
// OR It's been longer than the min saying interval, with less than 2 recent sayings, and they're not trying to say the same thing twice
|
||||
|| (gpGlobals->time > (this->mTimeOfLastSaying + kMinSayingInterval) && this->mRecentSayingCounter < 2
|
||||
&& !(gpGlobals->time < (this->mTimeOfLastSaying + kRepeatSayingInterval) && theMessageID == this->GetLastSaying())))
|
||||
{
|
||||
theIsValid = true;
|
||||
this->mRecentSayingCounter += 1;
|
||||
}
|
||||
// Check if repeat saying counter isn't getting decremented for some reason, like plugins intercepting the impulse.
|
||||
else if (gpGlobals->time > (this->mTimeOfLastSaying + kSpeakingTime + 0.05f))
|
||||
{
|
||||
ALERT(at_console, "Saying counter fallback triggered: %d\n", this->mRecentSayingCounter);
|
||||
theIsValid = true;
|
||||
this->mRecentSayingCounter = 1;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//2023 - Why???
|
||||
|
|
Loading…
Reference in a new issue