@@ -349,6 +349,7 @@ static void CG_ConfigStringModified(void) {
349349 cgs .voteModified = qtrue ;
350350 } else if (num == CS_VOTE_STRING ) {
351351 Q_strncpyz (cgs .voteString , str , sizeof (cgs .voteString ));
352+ trap_S_StartLocalSound (cgs .media .voteNow , CHAN_ANNOUNCER );
352353 } else if (num >= CS_TEAMVOTE_TIME && num <= CS_TEAMVOTE_TIME + 1 ) {
353354 cgs .teamVoteTime [num - CS_TEAMVOTE_TIME ] = atoi (str );
354355 cgs .teamVoteModified [num - CS_TEAMVOTE_TIME ] = qtrue ;
@@ -360,6 +361,7 @@ static void CG_ConfigStringModified(void) {
360361 cgs .teamVoteModified [num - CS_TEAMVOTE_NO ] = qtrue ;
361362 } else if (num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1 ) {
362363 Q_strncpyz (cgs .teamVoteString [num - CS_TEAMVOTE_STRING ], str , sizeof (cgs .teamVoteString ));
364+ trap_S_StartLocalSound (cgs .media .voteNow , CHAN_ANNOUNCER );
363365 } else if (num == CS_INTERMISSION ) {
364366 cg .intermissionStarted = atoi (str );
365367 } else if (num >= CS_MODELS && num < CS_MODELS + MAX_MODELS ) {
@@ -570,6 +572,13 @@ static void CG_ServerCommand(void) {
570572
571573 if (!strcmp (cmd , "print" )) {
572574 CG_Printf ("%s" , CG_Argv (1 ));
575+ cmd = CG_Argv (1 ); // yes, this is obviously a hack, but so is the way we hear about
576+ // votes passing or failing
577+ if (!Q_stricmpn (cmd , "vote failed" , 11 ) || !Q_stricmpn (cmd , "team vote failed" , 16 )) {
578+ trap_S_StartLocalSound (cgs .media .voteFailed , CHAN_ANNOUNCER );
579+ } else if (!Q_stricmpn (cmd , "vote passed" , 11 ) || !Q_stricmpn (cmd , "team vote passed" , 16 )) {
580+ trap_S_StartLocalSound (cgs .media .votePassed , CHAN_ANNOUNCER );
581+ }
573582 return ;
574583 }
575584
0 commit comments