From 8858b137b5ad4ca3ddfe505c93706440ab4e9522 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 13 May 2019 13:19:58 +0200 Subject: [PATCH] 3D:: fixed the radar in 3D to use the 3D version --- hud.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hud.cpp b/hud.cpp index 35831b13..ee2efe23 100644 --- a/hud.cpp +++ b/hud.cpp @@ -353,6 +353,8 @@ bool nofps = false; void draw_radar(bool cornermode) { + bool d3 = WDIM == 3; + dynamicval g(geometry, gEuclid); dynamicval pm(pmodel, mdUnchanged); dynamicval ga(geom3::always3, false); @@ -366,7 +368,7 @@ void draw_radar(bool cornermode) { curvepoint(atscreenpos(cx-cos(i * degree)*rad, cy-sin(i*degree)*rad, 1) * C0); queuecurve(0xFFFFFFFF, 0x000000FF, PPR::ZERO); - if(WDIM == 3) { + if(d3) { for(int i=0; i<360; i++) curvepoint(atscreenpos(cx-cos(i * degree)*rad, cy-sin(i*degree)*rad/3, 1) * C0); queuecurve(0xFF0000FF, 0x200000FF, PPR::ZERO); @@ -377,7 +379,7 @@ void draw_radar(bool cornermode) { queuecurve(0xFF8000FF, 0, PPR::ZERO); } - if(WDIM == 3) for(auto& r: radarpoints) { + if(d3) for(auto& r: radarpoints) { queueline(atscreenpos(cx+rad * r.h[0], cy - rad * r.h[2]/3 + rad * r.h[1]*2/3, 0)*C0, atscreenpos(cx+rad*r.h[0], cy - rad*r.h[2]/3, 0)*C0, r.line, -1); } @@ -385,7 +387,7 @@ void draw_radar(bool cornermode) { glflush(); for(auto& r: radarpoints) - if(WDIM == 3) displaychr(int(cx + rad * r.h[0]), int(cy - rad * r.h[2]/3 + rad * r.h[1]*2/3), 0, 8, r.glyph, r.color); + if(d3) displaychr(int(cx + rad * r.h[0]), int(cy - rad * r.h[2]/3 + rad * r.h[1]*2/3), 0, 8, r.glyph, r.color); else { int siz = 1/(1+r.h[3]) * scalefactor * current_display->radius / (inHighQual ? 10 : 6); displaychr(int(cx + rad * r.h[0]), int(cy - rad * r.h[1]), 0, siz, r.glyph, r.color);