]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/csqcmodel/cl_player.qc
Set a default value for cl_stairsmoothspeed in code so that it works in any engine
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / csqcmodel / cl_player.qc
index 4d41cd316103ef35a59b99c6578b44b0d2ba8179..12fa926e27f6fbae56aa32ebe7f3591ac6968405 100644 (file)
@@ -208,8 +208,8 @@ bool CSQCPlayer_IsLocalPlayer(entity this)
 }
 
 float stairsmoothz;
-float autocvar_cl_stairsmoothspeed;
-float autocvar_cl_smoothviewheight;
+float autocvar_cl_stairsmoothspeed = 160;
+float autocvar_cl_smoothviewheight = 0;
 float smooth_prevtime;
 float viewheightavg;
 vector CSQCPlayer_ApplySmoothing(entity this, vector v)
@@ -240,7 +240,7 @@ bool autocvar_v_deathtilt;
 float autocvar_v_deathtiltangle;
 void CSQCPlayer_ApplyDeathTilt(entity this)
 {
-       if(!IS_DEAD(this) || !autocvar_v_deathtilt)
+       if(!this.csqcmodel_isdead || !autocvar_v_deathtilt)
                return;
        view_angles.z = autocvar_v_deathtiltangle;
 }
@@ -279,7 +279,7 @@ float bobfall_speed;
 float bob2_smooth;
 vector CSQCPlayer_ApplyBobbing(entity this, vector v)
 {
-       if(IS_DEAD(this))
+       if(this.csqcmodel_isdead)
                return v;
 
        // bounded XY speed, used by several effects below