]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - view.c
lighthalf related transpoly cleanup
[xonotic/darkplaces.git] / view.c
diff --git a/view.c b/view.c
index 7f35721656ef0cc47f9ec1572de652d9527e86e1..f2daebbd8dc2e6f7ff8106681907bc789b0e5ee3 100644 (file)
--- a/view.c
+++ b/view.c
@@ -706,6 +706,7 @@ V_CalcRefdef
 
 ==================
 */
+extern qboolean intimerefresh;
 void V_CalcRefdef (void)
 {
        entity_t        *ent, *view;
@@ -725,8 +726,11 @@ void V_CalcRefdef (void)
 
 // transform the view offset by the model's matrix to get the offset from
 // model origin for the view
-       ent->angles[YAW] = cl.viewangles[YAW];  // the model should face the view dir
-       ent->angles[PITCH] = -cl.viewangles[PITCH];     // the model should face the view dir
+       if (!chase_active.value) // LordHavoc: get rid of angle problems in chase_active mode
+       {
+               ent->angles[YAW] = cl.viewangles[YAW];  // the model should face the view dir
+               ent->angles[PITCH] = -cl.viewangles[PITCH];     // the model should face the view dir
+       }
                                                                                
        
        bob = V_CalcBob ();
@@ -742,7 +746,10 @@ void V_CalcRefdef (void)
        r_refdef.vieworg[1] += 1.0/32;
        r_refdef.vieworg[2] += 1.0/32;
 
-       VectorCopy (cl.viewangles, r_refdef.viewangles);
+       if (!intimerefresh)
+       {
+               VectorCopy (cl.viewangles, r_refdef.viewangles);
+       }
        V_CalcViewRoll ();
        V_AddIdle ();
 
@@ -792,10 +799,13 @@ void V_CalcRefdef (void)
 
        view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
        view->frame = cl.stats[STAT_WEAPONFRAME];
-       view->colormap = vid.colormap;
+       view->colormap = 0; //vid.colormap;
 
 // set up the refresh position
-       VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
+       if (!intimerefresh)
+       {
+               VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
+       }
 
 // smooth out stair step ups
 if (cl.onground && ent->origin[2] - oldz > 0)
@@ -830,8 +840,6 @@ The player's clipping box goes from (-16 -16 -24) to (16 16 32) from
 the entity origin, so any view position inside that will be valid
 ==================
 */
-extern vrect_t scr_vrect;
-
 void V_RenderView (void)
 {
        if (con_forcedup)
@@ -847,8 +855,6 @@ void V_RenderView (void)
                        V_CalcRefdef ();
        }
 
-       R_PushDlights ();
-
        R_RenderView ();
 }