diff --git a/source/src/console.cpp b/source/src/console.cpp index 7b41aeb8..07d26240 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -32,7 +32,7 @@ struct console : consolebuffer void render() { - int conwidth = VIRTW*2 - 2*CONSPAD - (fullconsole ? 2 : 40)*FONTH/3; + int conwidth = (fullconsole ? VIRTW : int(floor(getradarpos().x)))*2 - 2*CONSPAD - 2*FONTH/3; int h = VIRTH*2 - 2*CONSPAD - 2*FONTH/3; int conheight = min(fullconsole ? (h*(fullconsole==1 ? altconsize : fullconsize))/100 : FONTH*consize, h); diff --git a/source/src/protos.h b/source/src/protos.h index d60087df..f71acba5 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -507,6 +507,7 @@ extern void hudonlyf(const char *s, ...); extern void hudeditf(int type, const char *s, ...); extern void show_out_of_renderloop_progress(float bar1, const char *text1, float bar2 = 0, const char *text2 = NULL); extern void updatedmgindicator(vec &attack); +extern vec getradarpos(); // renderparticles enum diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 52243cbd..329fe024 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -355,6 +355,13 @@ bool insideradar(const vec ¢erpos, float radius, const vec &o) bool isattacking(playerent *p) { return lastmillis-p->lastaction < 500; } +vec getradarpos() +{ + float radarviewsize = VIRTH/6; + float overlaysize = radarviewsize*4.0f/3.25f; + return vec(VIRTW-10-VIRTH/28-overlaysize, 10+VIRTH/52, 0); +} + void drawradar(playerent *p, int w, int h) { vec center = showmap ? vec(ssize/2, ssize/2, 0) : p->o;