]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Merge remote-tracking branch 'origin/Mario/tweaks'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 3ba72b815d9daf92f3790da2034359e9b57ce269..d813391bd6e32be463258c7f607ec59d735aca09 100644 (file)
@@ -802,7 +802,7 @@ void ClientKill_Now(entity this)
        if(this.killindicator_teamchange)
                ClientKill_Now_TeamChange(this);
 
-       if(IS_PLAYER(this))
+       if(!IS_SPEC(this) && !IS_OBSERVER(this))
                Damage(this, this, this, 100000, DEATH_KILL.m_id, this.origin, '0 0 0');
 
        // now I am sure the player IS dead
@@ -905,7 +905,7 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change,
                                setorigin(it.killindicator, '0 0 52');
                                setthink(it.killindicator, KillIndicator_Think);
                                it.killindicator.nextthink = starttime + (it.lip) * 0.05;
-                               clientkilltime = max(clientkilltime, it.killindicator.nextthink + 0.05);
+                               //clientkilltime = max(clientkilltime, it.killindicator.nextthink + 0.05);
                                it.killindicator.cnt = ceil(killtime);
                        });
                        this.lip = 0;
@@ -1735,7 +1735,6 @@ bool SpectatePrev(entity this)
                    ent = M_ARGV(1, entity);
                    break;
                case MUT_SPECPREV_RETURN:
-                   ent = M_ARGV(1, entity);
                    return true;
                case MUT_SPECPREV_CONTINUE:
                default:
@@ -2388,7 +2387,7 @@ void DrownPlayer(entity this)
        if(IS_DEAD(this))
                return;
 
-       if (this.waterlevel != WATERLEVEL_SUBMERGED)
+       if (this.waterlevel != WATERLEVEL_SUBMERGED || this.vehicle)
        {
                if(this.air_finished < time)
                        PlayerSound(this, playersound_gasp, CH_PLAYER, VOICETYPE_PLAYERSOUND);
@@ -2420,7 +2419,18 @@ void PlayerPostThink (entity this)
        if (IS_REAL_CLIENT(this))
        if (IS_PLAYER(this) || sv_maxidle_spectatorsareidle)
        {
-               if (time - this.parm_idlesince < 1) // instead of (time == this.parm_idlesince) to support sv_maxidle <= 10
+               int totalClients = 0;
+               if(sv_maxidle_slots > 0)
+               {
+                       FOREACH_CLIENT(IS_REAL_CLIENT(it) || sv_maxidle_slots_countbots,
+                       {
+                               ++totalClients;
+                       });
+               }
+
+               if (sv_maxidle_slots > 0 && (maxclients - totalClients) > sv_maxidle_slots)
+               { /* do nothing */ }
+               else if (time - this.parm_idlesince < 1) // instead of (time == this.parm_idlesince) to support sv_maxidle <= 10
                {
                        if (this.idlekick_lasttimeleft)
                        {