Spam.cpp: fix voice command spam not working after level change
This commit is contained in:
parent
7b4cb7535c
commit
1078c6d22f
@ -259,8 +259,8 @@ void createMove()
|
|||||||
|
|
||||||
if (voicecommand_spam)
|
if (voicecommand_spam)
|
||||||
{
|
{
|
||||||
static float last_voice_spam = 0.0f;
|
static Timer last_voice_spam;
|
||||||
if (g_GlobalVars->curtime - 4.0F > last_voice_spam)
|
if (last_voice_spam.test_and_set(4000))
|
||||||
{
|
{
|
||||||
switch (*voicecommand_spam)
|
switch (*voicecommand_spam)
|
||||||
{
|
{
|
||||||
@ -282,7 +282,6 @@ void createMove()
|
|||||||
case 6: // JEERS
|
case 6: // JEERS
|
||||||
g_IEngine->ServerCmd("voicemenu 2 3");
|
g_IEngine->ServerCmd("voicemenu 2 3");
|
||||||
}
|
}
|
||||||
last_voice_spam = g_GlobalVars->curtime;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user