From: Mario Date: Wed, 29 Jun 2016 01:26:39 +0000 (+1000) Subject: Use the player's size stat X-Git-Tag: xonotic-v0.8.2~700^2~114 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3bfbebaf229ae04045fa175723090194e809e4e1;p=xonotic%2Fxonotic-data.pk3dir.git Use the player's size stat --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index f23cb8b5c..20ce6cd86 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -200,7 +200,7 @@ void PutObserverInServer(entity this) this.angles_z = 0; this.fixangle = true; // offset it so that the spectator spawns higher off the ground, looks better this way - setorigin(this, spot.origin + STAT(PL_VIEW_OFS, NULL)); + setorigin(this, spot.origin + STAT(PL_VIEW_OFS, this)); this.prevorigin = this.origin; if (IS_REAL_CLIENT(this)) { @@ -217,7 +217,7 @@ void PutObserverInServer(entity this) FixPlayermodel(this); } setmodel(this, MDL_Null); - setsize(this, STAT(PL_CROUCH_MIN, NULL), STAT(PL_CROUCH_MAX, NULL)); + setsize(this, STAT(PL_CROUCH_MIN, this), STAT(PL_CROUCH_MAX, this)); this.view_ofs = '0 0 0'; } @@ -579,8 +579,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