]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use the player's size stat
authorMario <mario@smbclan.net>
Wed, 29 Jun 2016 01:26:39 +0000 (11:26 +1000)
committerMario <mario@smbclan.net>
Wed, 29 Jun 2016 01:26:39 +0000 (11:26 +1000)
qcsrc/server/cl_client.qc

index f23cb8b5c1ee4b068012e228fa671d807f39ad20..20ce6cd86c60b86bda060ddda1175c2163e3570a 100644 (file)
@@ -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