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.
This commit is contained in:
aurhat
2015-09-08 15:09:24 +02:00
parent 91753026dc
commit 03a39feab8
+2
View File
@@ -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;