]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
Added v_isometric cvars, this mode is mostly a curiosity but it's useful for testing...
[xonotic/darkplaces.git] / clvm_cmds.c
index 4734484513b85ee6ca4c8be317051458830ae75a..5ee778f9a7c2e52219474f2a857b47d195332fc4 100644 (file)
@@ -3252,18 +3252,15 @@ static void VM_CL_GetEntity (prvm_prog_t *prog)
 // --blub
 static void VM_CL_R_RenderScene (prvm_prog_t *prog)
 {
+       qboolean ismain = r_refdef.view.ismain;
        double t = Sys_DirtyTime();
        VM_SAFEPARMCOUNT(0, VM_CL_R_RenderScene);
 
        // update the views
-       if(r_refdef.view.ismain)
+       if(ismain)
        {
                // set the main view
                csqc_main_r_refdef_view = r_refdef.view;
-
-               // clear the flags so no other view becomes "main" unless CSQC sets VF_MAINVIEW
-               r_refdef.view.ismain = false;
-               csqc_original_r_refdef_view.ismain = false;
        }
 
        // we need to update any RENDER_VIEWMODEL entities at this point because
@@ -3280,6 +3277,14 @@ static void VM_CL_R_RenderScene (prvm_prog_t *prog)
        // callprofile fixing hack: do not include this time in what is counted for CSQC_UpdateView
        t = Sys_DirtyTime() - t;if (t < 0 || t >= 1800) t = 0;
        prog->functions[PRVM_clientfunction(CSQC_UpdateView)].totaltime -= t;
+
+       // update the views
+       if (ismain)
+       {
+               // clear the flags so no other view becomes "main" unless CSQC sets VF_MAINVIEW
+               r_refdef.view.ismain = false;
+               csqc_original_r_refdef_view.ismain = false;
+       }
 }
 
 //void(string texturename, float flag[, float is2d]) R_BeginPolygon