if (restart_mapalreadyrestarted || (time < game_starttime))
{
//NEW: changed behaviour so that it prevents that previous spectators/observers suddenly spawn as players
- if (self.classname == "player") {
+ if (IS_PLAYER(self)) {
//PlayerScore_Clear(self);
if(g_lms)
PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
FOR_EACH_REALCLIENT(tmp_player)
{
- if(tmp_player.classname == "player" || tmp_player.caplayer == 1)
+ if(IS_PLAYER(tmp_player) || tmp_player.caplayer == 1)
{
++t_players;
if(tmp_player.ready) { ++t_ready; }
// counted as "suicide" already
PlayerScore_Add(self, SP_SCORE, -1);
}
- else if(attacker.classname == "player")
+ else if(IS_PLAYER(attacker))
{
// got frozen by an enemy
// counted as "kill" and "death" already