only allow spectatemode 6 if user is admin or server is private or match

This commit is contained in:
drian
2021-03-08 06:48:45 +01:00
parent 90c4df658a
commit 280891b9c0
+1
View File
@@ -1713,6 +1713,7 @@ 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->clientrole != CR_ADMIN && servstate.mastermode != MM_MATCH && servstate.mastermode != MM_PRIVATE) return;
showscores(false);
switch(mode)
{