From 03a39feab8ef945b73b8596a1742cbfe8ee3c4db Mon Sep 17 00:00:00 2001 From: aurhat Date: Tue, 8 Sep 2015 15:09:24 +0200 Subject: [PATCH] Don't show players outside of map on minimap When client connected to server (or started to play demo), where there was a player dead since this client connecting, then position of the player on minimap (and radar) was displayed wrongly outside of the map, sometimes for the whole match. Now such positions will be hidden. --- source/src/renderhud.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 8bdb2b36..b93b0d60 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -477,6 +477,7 @@ void drawradar_showmap(playerent *p, int w, int h) { playerent *pl = players[i]; if(!pl || pl == p || !team_isactive(pl->team)) continue; + if(OUTBORD(pl->o.x, pl->o.y)) continue; int pl_baseteam = team_base(pl->team); if(p->team < TEAM_SPECT && ((m_teammode && !isteam(p_baseteam, pl_baseteam)) || (!m_teammode && !(spect3rd && d == pl)))) continue; if(p->team == TEAM_SPECT && !(spect3rd && (isteam(p_baseteam, pl_baseteam) || d == pl))) continue; @@ -573,6 +574,7 @@ void drawradar_vicinity(playerent *p, int w, int h) { playerent *pl = players[i]; if(!pl || pl == p || !team_isactive(pl->team)) continue; + if(OUTBORD(pl->o.x, pl->o.y)) continue; int pl_baseteam = team_base(pl->team); if(p->team < TEAM_SPECT && ((m_teammode && !isteam(p_baseteam, pl_baseteam)) || (!m_teammode && !(spect3rd && d == pl)))) continue; if(p->team == TEAM_SPECT && !(spect3rd && (isteam(p_baseteam, pl_baseteam) || d == pl))) continue;