diff --git a/Quake/gl_rmain.c b/Quake/gl_rmain.c index 36ba76cb..1e02242b 100644 --- a/Quake/gl_rmain.c +++ b/Quake/gl_rmain.c @@ -104,6 +104,7 @@ cvar_t r_showbboxes_health = {"r_showbboxes_health", "0", CVAR_NONE}; // 0=show cvar_t r_showbboxes_links = {"r_showbboxes_links", "3", CVAR_NONE}; // 0=off; 1=outgoing only; 2=incoming only; 3=incoming+outgoing cvar_t r_showbboxes_targets = {"r_showbboxes_targets", "1", CVAR_NONE}; cvar_t r_showfields = {"r_showfields", "0", CVAR_NONE}; +cvar_t r_showfields_align = {"r_showfields_align", "1", CVAR_ARCHIVE}; // 0=entity pos; 1=bottom-right cvar_t r_lerpmodels = {"r_lerpmodels", "1", CVAR_ARCHIVE}; cvar_t r_lerpmove = {"r_lerpmove", "1", CVAR_ARCHIVE}; cvar_t r_nolerp_list = {"r_nolerp_list", "progs/flame.mdl,progs/flame2.mdl,progs/braztall.mdl,progs/brazshrt.mdl,progs/longtrch.mdl,progs/flame_pyre.mdl,progs/v_saw.mdl,progs/v_xfist.mdl,progs/h2stuff/newfire.mdl", CVAR_NONE}; diff --git a/Quake/gl_rmisc.c b/Quake/gl_rmisc.c index 471651f3..778d9d53 100644 --- a/Quake/gl_rmisc.c +++ b/Quake/gl_rmisc.c @@ -41,6 +41,7 @@ extern cvar_t r_showbboxes_health; extern cvar_t r_showbboxes_links; extern cvar_t r_showbboxes_targets; extern cvar_t r_showfields; +extern cvar_t r_showfields_align; extern cvar_t r_lerpmodels; extern cvar_t r_lerpmove; extern cvar_t r_nolerp_list; @@ -335,6 +336,7 @@ void R_Init (void) Cvar_RegisterVariable (&r_showbboxes_links); Cvar_RegisterVariable (&r_showbboxes_targets); Cvar_RegisterVariable (&r_showfields); + Cvar_RegisterVariable (&r_showfields_align); Cvar_RegisterVariable (&gl_farclip); Cvar_RegisterVariable (&gl_fullbrights); Cvar_SetCallback (&gl_fullbrights, GL_Fullbrights_f); diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index 11748a1f..753b0907 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -124,6 +124,7 @@ extern cvar_t con_notifyfadetime; extern edict_t **bbox_linked; extern cvar_t r_showfields; +extern cvar_t r_showfields_align; qboolean scr_initialized; // ready to draw @@ -1369,9 +1370,9 @@ void SCR_DrawEdictInfo (void) // Compute anchor point if (i == 0) { - // With r_showfields < 0 the field overlay tracks the focused entity, + // With r_showfields_align 0 the field overlay tracks the focused entity, // so we disable the simple one (number + classname) to avoid overlap. - if (r_showfields.value < 0.f) + if (!r_showfields_align.value) continue; //SCR_GetEntityBottom (ed, anchor); SCR_GetEntityCenter (ed, anchor); @@ -1418,8 +1419,8 @@ void SCR_DrawEdictInfo (void) ProjectVector (anchor, r_matviewproj, proj); SCR_ProjToCanvas (proj, &proj2canvas, &x, &y); - // r_showfields > 0 locks the overlay to the bottom-right - if (r_showfields.value > 0.f) + // r_showfields_align 1 locks the overlay to the bottom-right + if (r_showfields_align.value) { x = glcanvas.right; y = glcanvas.bottom;