From: Rudolf Polzer Date: Thu, 19 Aug 2010 05:38:23 +0000 (+0200) Subject: csqc-only workaround (mostly by terencehill) to work around for engine csqc bugs... X-Git-Tag: xonotic-v0.1.0preview~339 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1fdc4776504b9fc54e4c2e5143cd669ec0fe10fb;p=xonotic%2Fxonotic-data.pk3dir.git csqc-only workaround (mostly by terencehill) to work around for engine csqc bugs with view size; waypointsprites still draw wrong though --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 2059527cd..13312135c 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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); diff --git a/qcsrc/client/csqc_builtins.qc b/qcsrc/client/csqc_builtins.qc index ec2ab9a31..0835c742d 100644 --- a/qcsrc/client/csqc_builtins.qc +++ b/qcsrc/client/csqc_builtins.qc @@ -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;