]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Keep player size and view offset stats up to date
authorMario <mario@smbclan.net>
Sat, 8 Oct 2016 18:34:13 +0000 (04:34 +1000)
committerMario <mario@smbclan.net>
Sat, 8 Oct 2016 18:34:13 +0000 (04:34 +1000)
qcsrc/common/physics/player.qc
qcsrc/server/client.qc

index 4eb527d62adeddc73a870d334afab0c8ca42e9d2..09882c02da2b74fbb63cf77bccf366ede1cc213d 100644 (file)
@@ -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);
index 9432b6704e217d53ba966a2fa148cb2f09b477e2..f9b06bdad7f1b4e1b81390a1ba7ea6d49da477e5 100644 (file)
@@ -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