]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
csqc-only workaround (mostly by terencehill) to work around for engine csqc bugs...
authorRudolf Polzer <divverent@alientrap.org>
Thu, 19 Aug 2010 05:38:23 +0000 (07:38 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 19 Aug 2010 05:38:23 +0000 (07:38 +0200)
qcsrc/client/View.qc
qcsrc/client/csqc_builtins.qc

index 2059527cdbe55425ecd09bc09db83af3522cc2e8..13312135ca39762ec017e876371632d0785b3366 100644 (file)
@@ -354,6 +354,12 @@ void CSQC_UpdateView(float w, float h)
        float fov;
        float f, i, j;
        vector v, vo;
+       vector vf_size, vf_min;
+
+       vf_size = R_SetView3fv(VF_SIZE);
+       vf_min = R_SetView3fv(VF_MIN);
+       vid_width = vf_size_x;
+       vid_height = vf_size_y;
 
        vector reticle_pos, reticle_size;
 
@@ -398,9 +404,6 @@ void CSQC_UpdateView(float w, float h)
                view_set = 1;
        }
 
-       vid_width = w;
-       vid_height = h;
-
 #ifdef BLURTEST
        if(time > blurtest_time0 && time < blurtest_time1)
        {
@@ -488,6 +491,10 @@ void CSQC_UpdateView(float w, float h)
        // ALWAYS Clear Current Scene First
        R_ClearScene();
 
+       // FIXME engine bug? VF_SIZE and VF_MIN are not restored to sensible values by this
+       R_SetView(VF_SIZE, vf_size);
+       R_SetView(VF_MIN, vf_min);
+
        // Assign Standard Viewflags
        // Draw the World (and sky)
        R_SetView(VF_DRAWWORLD, 1);
index ec2ab9a3195892c29191d391e9d30e90cd380ebb..0835c742db2499eeb51f3eddd0144fdce2c7f7a9 100644 (file)
@@ -79,6 +79,7 @@ void ()                                                                       R_ClearScene = #300;
 void (float mask)                                                      R_AddEntities = #301;
 void (entity e)                                                                R_AddEntity = #302;
 float (float property, ...)                                            R_SetView = #303;
+vector (float property, ...)                                           R_SetView3fv = #303;
 void ()                                                                        R_RenderScene = #304;
 void (vector org, float radius, vector rgb)                            R_AddDynamicLight = #305;
 void ()                                                                        R_CalcRefDef = #306;