]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Merge branch 'master' into terencehill/accuracy_shotgun
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 3d5f951a42e0b6b7d5be0ba019692c2aea9d1791..3688c4eceb49022b6cf05770addf58ff4635d305 100644 (file)
@@ -1191,12 +1191,10 @@ void ClientConnect(entity this)
        }
        if (!teamplay && this.team_forced > 0) this.team_forced = 0;
 
-    {
-        int id = this.playerid;
-        this.playerid = 0; // silent
-           JoinBestTeam(this, false); // if the team number is valid, keep it
-           this.playerid = id;
-    }
+       int playerid_save = this.playerid;
+       this.playerid = 0; // silent
+       JoinBestTeam(this, false); // if the team number is valid, keep it
+       this.playerid = playerid_save;
 
        if (autocvar_sv_spectate || autocvar_g_campaign || this.team_forced < 0) {
                TRANSMUTE(Observer, this);
@@ -2767,6 +2765,11 @@ void PlayerPostThink (entity this)
        }
 
        if (IS_PLAYER(this)) {
+               if(this.death_time == time && IS_DEAD(this))
+               {
+                       this.maxs.z = 5;
+                       setsize(this, this.mins, this.maxs);
+               }
                DrownPlayer(this);
                UpdateChatBubble(this);
                if (CS(this).impulse) ImpulseCommands(this);