barry0033 Posted December 6, 2015 Posted December 6, 2015 Hi! Does anyone know how I could disable spectating a bot? (such as that using cmds /follow <clientnumber> or /follownext wouldn't allow SPECTATOR FOLLOW on the bot; following humanplayers should then still remain functional though). If so, could they shed some light on this? I've searched a lot of open-source q3 mods and forums for this, but yet haven't found the answer.. Is it perhaps simply in g_active.c "SpectatorClientEndFrame" section? I'm asking this because I'm making a 'boss'-fight map, with the bot remaining in a 'hidden' area The Goal I want to achieve: make it impossible to spectate bots Thanks!!
Solution barry0033 Posted December 8, 2015 Author Solution Posted December 8, 2015 Ok, so if anyone is interested in knowing, just add (the lines marked in yellow) this to g_cmds.c: ----------------------------------------------------------------------/*=================Cmd_FollowCycle_f=================*/void Cmd_FollowCycle_f( gentity_t *ent, int dir ) { int clientnum; int original; qboolean isBot; ... // can't follow bots if (!isBot) { return; } // can't follow another spectator if ( level.clients[ clientnum ].sess.sessionTeam == TEAM_SPECTATOR ) { continue; }-------------------------------------------------------------------------------------------------- Bart likes this
barry0033 Posted December 9, 2015 Author Posted December 9, 2015 And /follow <clientNum>?eh, just add it to Cmd_Follow_f too then the right function is actually this: // can't follow bots if ( isBot ) { return; } Smoo likes this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now