* g_maxplayers_spectator_blocktime seconds
*/
void checkSpectatorBlock() {
- if(IS_SPEC(self) || IS_OBSERVER(self)) {
+ if(IS_SPEC(self) || IS_OBSERVER(self))
+ if(!self.caplayer)
+ if(IS_REAL_CLIENT(self))
+ {
if( time > (self.spectatortime + autocvar_g_maxplayers_spectator_blocktime) ) {
Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
dropclient(self);
FOR_EACH_REALPLAYER(client)
{
self = client;
+ if(self.caplayer)
+ self.caplayer = 0;
PutObserverInServer();
++i;
}
if(!IS_SPEC(client) && !IS_OBSERVER(client))
{
self = client;
+ if(self.caplayer)
+ self.caplayer = 0;
PutObserverInServer();
successful = strcat(successful, (successful ? ", " : ""), client.netname);
{
blockSpectators = 1;
entity plr;
- FOR_EACH_CLIENT(plr) //give every spectator <g_maxplayers_spectator_blocktime> seconds time to become a player
+ FOR_EACH_REALCLIENT(plr) //give every spectator <g_maxplayers_spectator_blocktime> seconds time to become a player
{
if(IS_SPEC(plr) || IS_OBSERVER(plr))
+ if(!plr.caplayer)
{
plr.spectatortime = time;
Send_Notification(NOTIF_ONE_ONLY, plr, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);