disallow spectatemode 6 in case of benchme

This commit is contained in:
drian
2021-03-30 08:57:00 +02:00
parent 94d4992a60
commit 27e981aa93
+6 -1
View File
@@ -1713,7 +1713,12 @@ void spectatemode(int mode)
{
if((player1->state != CS_DEAD && player1->state != CS_SPECTATE && !team_isspect(player1->team)) || (!m_teammode && !team_isspect(player1->team) && servstate.mastermode == MM_MATCH)) return; // during ffa matches only SPECTATORS can spectate
if(mode == player1->spectatemode || (m_botmode && mode != SM_FLY)) return;
if(mode == SM_OVERVIEW && (player1->state == CS_DEAD || (servstate.mastermode != MM_MATCH && servstate.mastermode != MM_PRIVATE))) return;
if(mode == SM_OVERVIEW)
{
// the spectate mode SM_OVERVIEW is like a radar hack and therefore is only allowed under certain conditions
bool notmatchnotprivate = (servstate.mastermode != MM_MATCH && servstate.mastermode != MM_PRIVATE);
if(player1->state == CS_DEAD || player1->team == TEAM_CLA_SPECT || player1->team == TEAM_RVSF_SPECT || notmatchnotprivate) return;
}
showscores(false);
switch(mode)
{