# HG changeset patch # User Adam Kaminski # Date 1614530357 18000 # Sun Feb 28 11:39:17 2021 -0500 # Node ID ad22b5a9be4d57f9539613c26dadbce2f9c67626 # Parent 876945e8eb3f402174de0eda930f45cab5618417 Prevented "forcespec" votes from being called on true spectators. diff -r 876945e8eb3f -r ad22b5a9be4d src/callvote.cpp --- a/src/callvote.cpp Sat Feb 27 22:29:49 2021 -0500 +++ b/src/callvote.cpp Sun Feb 28 11:39:17 2021 -0500 @@ -803,6 +803,12 @@ SERVER_PrintfPlayer( SERVER_GetCurrentClient( ), "This player is a server admin and thus can't be kicked or forced to spectate!\n" ); return ( false ); } + // [AK] Don't force a player to spectate if they're already a true spectator. + if (( ulVoteCmd == VOTECMD_FORCETOSPECTATE ) && ( PLAYER_IsTrueSpectator( &players[ulIdx] ))) + { + SERVER_PrintfPlayer( SERVER_GetCurrentClient( ), "You cannot force a player to spectate if they're already spectating!\n" ); + return ( false ); + } g_KickVoteVictimAddress = SERVER_GetClient( ulIdx )->Address; return ( true ); }