From d86e1a9581af02df3c029319dd8b93088b2637da Mon Sep 17 00:00:00 2001 From: aurhat Date: Fri, 23 Jan 2015 21:36:15 +0100 Subject: [PATCH] Allow only flying spectating in bot modes --- source/src/clientgame.cpp | 6 +++--- source/src/renderhud.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 5b118787..205cc815 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -1695,7 +1695,7 @@ void spectate() void setfollowplayer(int cn) { // silently ignores invalid player-cn value passed - if(players.inrange(cn) && players[cn]) + if(players.inrange(cn) && players[cn] && !m_botmode) { if(!(m_teammode && player1->team != TEAM_SPECT && !watchingdemo && team_base(players[cn]->team) != team_base(player1->team))) { @@ -1709,7 +1709,7 @@ void setfollowplayer(int cn) 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) return; + if(mode == player1->spectatemode || (m_botmode && mode != SM_FLY)) return; showscores(false); switch(mode) { @@ -1758,7 +1758,7 @@ void togglespect() // cycle through all spectating modes void changefollowplayer(int shift) { - updatefollowplayer(shift); + if(!m_botmode) updatefollowplayer(shift); } COMMAND(spectate, ""); diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 7b01b4f1..371b07c3 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -1031,7 +1031,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat glOrtho(0, VIRTW*3/2, VIRTH*3/2, 0, -1, 1); const int left = (VIRTW)*3/2, top = (VIRTH*3/2)*3/4; draw_textf("SPACE to change view", left - (text_width("SCROLL to change player") + FONTH/2), top); - draw_textf("SCROLL to change player", left - (text_width("SCROLL to change player") + FONTH/2), top+80); + if(!m_botmode) draw_textf("SCROLL to change player", left - (text_width("SCROLL to change player") + FONTH/2), top+80); } /* * /