]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Lets just set resolution via a cvar
authorSamual Lenks <samual@xonotic.org>
Fri, 27 Dec 2013 01:32:10 +0000 (20:32 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 27 Dec 2013 01:32:10 +0000 (20:32 -0500)
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/client/autocvars.qh

index 13cae012db3580d753e633422d3ef77e2306fb40..25e2a284be05289cf34171f86f950f4ee90ae66e 100644 (file)
@@ -143,6 +143,7 @@ alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.1
 
 set cl_orthoview 0 "WARNING: WILL BREAK CONFIG!!! enable top-down view of the map- meant to be used for radar map images"
 set cl_orthoview_nofog 1 "disable fog while in orthoview-- note, should not be enabled on ALL maps, i.e. oilrig works fine with this disabled"
+set cl_orthoview_resolution 512 "resolution accuracy multiplier for deciding fov scaling and view distance"
 
 // these settings determine how much the view is affected by movement/damage
 cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
index 89b84e370dc45df100c70fb83f1878174fa25e05..5de6e467ed19ae8239b21d2a9057b5567283ec10 100644 (file)
@@ -565,14 +565,12 @@ void CSQC_UpdateView(float w, float h)
        vector ov_worldmax = '0 0 0';
        if(autocvar_cl_orthoview)
        {
-               #define ORTHO_ACCURACY 512 // x^2 resolution accuracy for evaluating fov scaling and distance
-
                ov_worldmin = mi_picmin;
                ov_worldmax = mi_picmax;
-               
+
                float ov_width = (ov_worldmax_x - ov_worldmin_x);
                float ov_height = (ov_worldmax_y - ov_worldmin_y);
-               float ov_distance = (ORTHO_ACCURACY * max(ov_width, ov_height));
+               float ov_distance = (autocvar_cl_orthoview_resolution * max(ov_width, ov_height));
 
                ov_mid = ((ov_worldmax + ov_worldmin) * 0.5);
                ov_org = FL2VEC(ov_mid_x, ov_mid_y, (ov_mid_z + ov_distance));
index 43aab6ae44c73f3c2b0c598bbe4ae3d72014248e..16c5fc76a8308eb3e122843cabcd11fdd3627e4e 100644 (file)
@@ -56,6 +56,7 @@ float autocvar_cl_lockview;
 float autocvar_cl_nogibs;
 float autocvar_cl_orthoview;
 float autocvar_cl_orthoview_nofog;
+float autocvar_cl_orthoview_resolution;
 float autocvar_cl_particlegibs;
 float autocvar_cl_particles_oldnexbeam;
 float autocvar_cl_particles_quality;