From: Mario Date: Sat, 8 Oct 2016 18:34:13 +0000 (+1000) Subject: Keep player size and view offset stats up to date X-Git-Tag: xonotic-v0.8.2~530 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dcb6fbf52a99ff9ab1f99482d4b0a57bacb7afa4;p=xonotic%2Fxonotic-data.pk3dir.git Keep player size and view offset stats up to date --- diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 4eb527d62..09882c02d 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -39,6 +39,13 @@ void Physics_UpdateStats(entity this, float maxspd_mod) STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod; STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking + STAT(PL_MIN, this) = autocvar_sv_player_mins; + STAT(PL_MAX, this) = autocvar_sv_player_maxs; + STAT(PL_VIEW_OFS, this) = autocvar_sv_player_viewoffset; + STAT(PL_CROUCH_MIN, this) = autocvar_sv_player_crouch_mins; + STAT(PL_CROUCH_MAX, this) = autocvar_sv_player_crouch_maxs; + STAT(PL_CROUCH_VIEW_OFS, this) = autocvar_sv_player_crouch_viewoffset; + // old stats // fix some new settings STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, this) = Physics_ClientOption(this, "airaccel_qw_stretchfactor", autocvar_sv_airaccel_qw_stretchfactor); diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 9432b6704..f9b06bdad 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -626,8 +626,8 @@ void PutClientInServer(entity this) this.drawonlytoclient = NULL; this.crouch = false; - this.view_ofs = STAT(PL_VIEW_OFS, NULL); - setsize(this, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL)); + this.view_ofs = STAT(PL_VIEW_OFS, this); + setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this)); this.spawnorigin = spot.origin; 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