Client: offset the radar and weaponselect by a fair bit so we don't overlap

This commit is contained in:
Marco Cawthorne 2021-03-17 16:17:17 +01:00
parent 14c23b521f
commit 4a66a9d364
3 changed files with 6 additions and 4 deletions

View file

@ -670,13 +670,13 @@ HUD_Draw(void)
return;
}
Radar_Draw();
HUD_DrawNotify();
HUD_DrawHealth();
HUD_DrawArmor();
HUD_DrawZones();
HUD_DrawProgress();
HUD_DrawFlashlight();
Radar_Draw();
Damage_Draw();
}

View file

@ -189,7 +189,7 @@ HUD_DrawWeaponSelect(void)
return;
}
vector vecPos = g_hudmins + [16,16];
vector vecPos = g_hudmins + [128+32,16];
int b;
int wantslot = g_weapons[pSeat->m_iHUDWeaponSelected].slot;

View file

@ -27,7 +27,9 @@ Radar_Init(void)
void
Radar_Draw(void)
{
drawpic(g_hudmins, g_cs_radar, [128,128], [1,1,1], 0.25f, DRAWFLAG_ADDITIVE);
vector radpos = g_hudmins + [16,16];
drawpic(radpos, g_cs_radar, [128,128], [1,1,1], 0.25f, DRAWFLAG_ADDITIVE);
for (entity a = world; (a = find(a, ::classname, "player"));) {
vector color;
@ -61,7 +63,7 @@ Radar_Draw(void)
matrix[2] = 0;
/* we need to fit 1024 in-game units into the 64px radar image */
vector apos = g_hudmins + [62,62] + (matrix * (64/CSRADAR_DISTANCE));
vector apos = radpos + [62,62] + (matrix * (64/CSRADAR_DISTANCE));
if (getplayerkeyfloat(a.entnum-1, "*team") == TEAM_CT)
color = [115, 155, 205] / 255;