Spam.cpp: fix voice command spam not working after level change

This commit is contained in:
Unnamed 2019-01-26 03:59:21 +00:00 committed by LightCat
parent 7b4cb7535c
commit 1078c6d22f

View File

@ -259,8 +259,8 @@ void createMove()
if (voicecommand_spam)
{
static float last_voice_spam = 0.0f;
if (g_GlobalVars->curtime - 4.0F > last_voice_spam)
static Timer last_voice_spam;
if (last_voice_spam.test_and_set(4000))
{
switch (*voicecommand_spam)
{
@ -282,7 +282,6 @@ void createMove()
case 6: // JEERS
g_IEngine->ServerCmd("voicemenu 2 3");
}
last_voice_spam = g_GlobalVars->curtime;
}
}
}