X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=3688c4eceb49022b6cf05770addf58ff4635d305;hp=ec6342a2a2212179a4b7dca0e8153634afd82076;hb=b945d959784e5b249c66aea4f3326d8ae048f1cd;hpb=bfb9c564b4a93cfb5c97c1eff079541f78e2ee3f diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index ec6342a2a2..3688c4eceb 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -617,7 +617,10 @@ void PutPlayerInServer(entity this) this.fire_endtime = -1; this.revive_progress = 0; this.revival_time = 0; + this.air_finished = time + 12; + this.waterlevel = WATERLEVEL_NONE; + this.watertype = CONTENT_EMPTY; entity spawnevent = new_pure(spawnevent); spawnevent.owner = this; @@ -639,7 +642,6 @@ void PutPlayerInServer(entity this) setorigin(this, spot.origin + '0 0 1' * (1 - this.mins.z - 24)); // don't reset back to last position, even if new position is stuck in solid this.oldorigin = this.origin; - this.lastteleporttime = time; // prevent insane speeds due to changing origin if(this.conveyor) IL_REMOVE(g_conveyed, this); this.conveyor = NULL; // prevent conveyors at the previous location from moving a freshly spawned player @@ -1189,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); @@ -2663,7 +2663,7 @@ void PlayerPreThink (entity this) void DrownPlayer(entity this) { - if(IS_DEAD(this)) + if(IS_DEAD(this) || game_stopped || time < game_starttime) return; if (this.waterlevel != WATERLEVEL_SUBMERGED || this.vehicle) @@ -2765,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);