Make noises on the password entry screen

This commit is contained in:
fickleheart 2019-03-10 17:36:16 -05:00
parent 4a8d682b43
commit 048ce8496f

View file

@ -4001,11 +4001,23 @@ static void HandlePacketFromAwayNode(SINT8 node)
cl_mode = CL_CHALLENGE; cl_mode = CL_CHALLENGE;
if (cl_challengeattempted == 2) switch (cl_challengeattempted)
{ {
case 2:
// We already sent a correct password, so throw it back up again. // We already sent a correct password, so throw it back up again.
D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer); D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer);
cl_mode = CL_ASKJOIN; cl_mode = CL_ASKJOIN;
break;
case 1:
// We entered the wrong password!
S_StartSound(NULL, sfx_s26d);
break;
default:
// First entry to the password screen.
S_StartSound(NULL, sfx_s224);
break;
} }
} }
break; break;
@ -4064,6 +4076,9 @@ static void HandlePacketFromAwayNode(SINT8 node)
break; break;
} }
if (cl_challengeattempted == 1) // Successful password noise.
S_StartSound(NULL, sfx_s221);
cl_challengeattempted = 2; cl_challengeattempted = 2;
CONS_Printf("trying to download\n"); CONS_Printf("trying to download\n");
if (CL_SendRequestFile()) if (CL_SendRequestFile())
@ -4085,6 +4100,9 @@ static void HandlePacketFromAwayNode(SINT8 node)
if (cl_mode != CL_WAITJOINRESPONSE) if (cl_mode != CL_WAITJOINRESPONSE)
break; break;
if (cl_challengeattempted == 1) // Successful password noise.
S_StartSound(NULL, sfx_s221);
if (client) if (client)
{ {
maketic = gametic = neededtic = (tic_t)LONG(netbuffer->u.servercfg.gametic); maketic = gametic = neededtic = (tic_t)LONG(netbuffer->u.servercfg.gametic);