=============
*/
+.float clientkill_nexttime;
void ClientKill_Now_TeamChange()
{
if(self.killindicator_teamchange == -1)
JoinBestTeam( self, FALSE, FALSE );
}
else if(self.killindicator_teamchange == -2)
+ {
+ if(g_ca)
+ self.caplayer = 0;
+ if(blockSpectators)
+ sprint(self, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
PutObserverInServer();
+ }
else
SV_ChangeTeam(self.killindicator_teamchange - 1);
}
if(g_race_qualifying)
killtime = 0;
+ // flood control it
+ killtime = max(killtime, self.clientkill_nexttime - time);
+ self.clientkill_nexttime = time + killtime + autocvar_g_balance_kill_antispam;
+
self.killindicator_teamchange = targetteam;
if(!self.killindicator)
}
if(self.killindicator)
{
- if(targetteam)
- self.killindicator.colormod = TeamColor(targetteam);
- else
+ if(targetteam == 0) // just die
self.killindicator.colormod = '0 0 0';
+ else if(targetteam == -1) // auto
+ self.killindicator.colormod = '0 1 0';
+ else if(targetteam == -2) // spectate
+ self.killindicator.colormod = '0.5 0.5 0.5';
+ else
+ self.killindicator.colormod = TeamColor(targetteam);
}
}