]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/csqcmodel/cl_player.qc
Use the constants for player hitbox size when applicable (should fix observer hitbox)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / csqcmodel / cl_player.qc
index 66613b53229ad6ef53d34a9ad43bc0b0ed413abd..9e26e70fb7424ff07d3fbf79747bffe218c1dd4f 100644 (file)
@@ -109,15 +109,15 @@ void CSQCPlayer_SetMinsMaxs(entity this)
 {
        if (IS_DUCKED(this) || !this.isplayermodel)
        {
-               this.mins = STAT(PL_CROUCH_MIN, NULL);
-               this.maxs = STAT(PL_CROUCH_MAX, NULL);
-               this.view_ofs = STAT(PL_CROUCH_VIEW_OFS, NULL);
+               this.mins = STAT(PL_CROUCH_MIN, this);
+               this.maxs = STAT(PL_CROUCH_MAX, this);
+               this.view_ofs = STAT(PL_CROUCH_VIEW_OFS, this);
        }
        else
        {
-               this.mins = STAT(PL_MIN, NULL);
-               this.maxs = STAT(PL_MAX, NULL);
-               this.view_ofs = STAT(PL_VIEW_OFS, NULL);
+               this.mins = STAT(PL_MIN, this);
+               this.maxs = STAT(PL_MAX, this);
+               this.view_ofs = STAT(PL_VIEW_OFS, this);
        }
 }
 
@@ -226,8 +226,8 @@ void CSQCPlayer_SetCamera()
 {
        const vector v0 = ((intermission && !autocvar_cl_movement_intermissionrunning) ? '0 0 0' : pmove_vel); // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity
        const float vh = STAT(VIEWHEIGHT);
-       const vector pl_viewofs = STAT(PL_VIEW_OFS, NULL);
-       const vector pl_viewofs_crouch = STAT(PL_CROUCH_VIEW_OFS, NULL);
+       const vector pl_viewofs = STAT(PL_VIEW_OFS);
+       const vector pl_viewofs_crouch = STAT(PL_CROUCH_VIEW_OFS);
        const entity e = csqcplayer;
        if (e)
        {