From 0a10912403dec5751e6d29b11996c90b8940e470 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 30 May 2019 11:08:21 +0200 Subject: [PATCH] dual:: minimap --- hud.cpp | 4 +++- multigame.cpp | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hud.cpp b/hud.cpp index 6f0c4eee..4e65d828 100644 --- a/hud.cpp +++ b/hud.cpp @@ -355,6 +355,7 @@ extern ld max_eu_dist; void draw_radar(bool cornermode) { + if(dual::split([] { dual::in_subscreen([] { calcparam(); draw_radar(false); }); })) return; bool d3 = WDIM == 3; bool hyp = hyperbolic; bool sph = sphere; @@ -364,8 +365,9 @@ void draw_radar(bool cornermode) { dynamicval ga(vid.always3, false); initquickqueue(); int rad = vid.radarsize; + if(dual::state) rad /= 2; - ld cx = cornermode ? rad+2 : vid.xres-rad-2; + ld cx = dual::state ? (dual::currently_loaded ? vid.xres/2+rad+2 : vid.xres/2-rad-2) : cornermode ? rad+2 : vid.xres-rad-2; ld cy = vid.yres-rad-2 - vid.fsize; for(int i=0; i<360; i++) diff --git a/multigame.cpp b/multigame.cpp index 82a3482f..85d64fea 100644 --- a/multigame.cpp +++ b/multigame.cpp @@ -22,6 +22,10 @@ void gamedata_all(gamedata& gd) { gd.store(genrange_bonus); gd.store(gamerange_bonus); gd.store(targets); + if(GDIM == 3) { + gd.store(radarlines); + gd.store(radarpoints); + } if(GOLDBERG) gd.store(gp::param); callhooks(hooks_gamedata, &gd); }