]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/csqcmodel/cl_player.qc
Remove .move_* fields and MOVETYPE_PUSH logic (doesn't work)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / csqcmodel / cl_player.qc
index 0b0de75649aab42d97851711fca47dd1342c8bf8..58c5f71f039d6686141fffc0806567fdf87a70d2 100644 (file)
@@ -35,6 +35,7 @@
 #include <common/viewloc.qh>
 
 float autocvar_cl_movement_errorcompensation = 0;
+bool autocvar_cl_movement_intermissionrunning = false;
 
 // engine stuff
 float pmove_onground; // weird engine flag we shouldn't really use but have to for now
@@ -137,24 +138,12 @@ void Movetype_Physics_Spam(entity this)  // optimized
        if(wasfreed(this))
                return;
 
-       this.avelocity = this.move_avelocity;
-       this.velocity = this.move_velocity;
-       this.angles = this.move_angles;
-       this.flags = BITSET(this.flags, FL_ONGROUND, boolean(this.move_flags & FL_ONGROUND));
-       this.flags = BITSET(this.flags, FL_WATERJUMP, boolean(this.move_flags & FL_WATERJUMP));
-       this.waterlevel = this.move_waterlevel;
-       this.watertype = this.move_watertype;
-       setorigin(this, this.move_origin);
+       setorigin(this, this.origin);
 }
 
 void CSQCPlayer_CheckWater(entity this)
 {
-       this.move_origin = this.origin;
-       this.move_waterlevel = this.waterlevel;
-       this.move_watertype = this.watertype;
        _Movetype_CheckWater(this);
-       this.waterlevel = this.move_waterlevel;
-       this.watertype = this.move_watertype;
 }
 
 void CSQCPlayer_Physics(entity this)
@@ -172,18 +161,7 @@ void CSQCPlayer_Physics(entity this)
                CSQC_ClientMovement_PlayerMove_Frame(this);
 
                if(autocvar_cl_movement == 1)
-               {
-                       this.move_origin = this.origin;
-                       this.move_angles = this.angles;
-                       //this.move_movetype = MOVETYPE_WALK; // temp
-                       this.move_velocity = this.velocity;
-                       this.move_avelocity = this.avelocity;
-                       this.move_flags = BITSET(this.move_flags, FL_ONGROUND, IS_ONGROUND(this));
-                       this.move_flags = BITSET(this.move_flags, FL_WATERJUMP, boolean(this.flags & FL_WATERJUMP));
-                       this.move_waterlevel = this.waterlevel;
-                       this.move_watertype = this.watertype;
                        Movetype_Physics_Spam(this);
-               }
 
                view_angles = this.v_angle;
                input_angles = this.angles;
@@ -254,7 +232,7 @@ void CSQCPlayer_SetViewLocation()
 /** Called once per CSQC_UpdateView() */
 void CSQCPlayer_SetCamera()
 {
-       const vector v0 = pmove_vel; // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity
+       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);