mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-10 14:42:05 +00:00
FTE/CLIENT: Properly display all 4 Client's Points on HUD
This commit is contained in:
parent
adc1b21c21
commit
a063935aba
1 changed files with 13 additions and 14 deletions
|
@ -307,8 +307,8 @@ void(float pwidth, float width, float height, float playernum) PointUpdate =
|
||||||
|
|
||||||
void(float width, float height) HUD_Points =
|
void(float width, float height) HUD_Points =
|
||||||
{
|
{
|
||||||
local float pointlength = 0, increm = 10, i = 0, pointwidth = 0, x = 0;
|
float pointlength = 0, increm = 10, i = 0, pointwidth = 0, x = 0;
|
||||||
local float backwidth = 0.8*width;
|
float backwidth = 0.8*width;
|
||||||
vector TEXTCOLOR = '0 0 0';
|
vector TEXTCOLOR = '0 0 0';
|
||||||
|
|
||||||
for (i = 3; i >= 0; i = i - 1)
|
for (i = 3; i >= 0; i = i - 1)
|
||||||
|
@ -322,20 +322,19 @@ void(float width, float height) HUD_Points =
|
||||||
case 3: TEXTCOLOR = TEXT_GREEN; break;
|
case 3: TEXTCOLOR = TEXT_GREEN; break;
|
||||||
default: TEXTCOLOR = [1, 1, 1]; break;
|
default: TEXTCOLOR = [1, 1, 1]; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((i+1) == getstatf(STAT_PLAYERNUM)) {
|
pointwidth = stringwidth(ftos(playerpoints[i]), 0, [12, 12]);
|
||||||
pointwidth = stringwidth(ftos(playerpoints[i]), 0, [12, 12]);
|
x = (99 - pointwidth)/2 + GetUltraWideOffset();
|
||||||
x = (99 - pointwidth)/2 + GetUltraWideOffset();
|
|
||||||
drawpic([3 + GetUltraWideOffset(), g_height - 95], "gfx/hud/moneyback.tga", [96, 24], [1,1,1], 1);
|
if ((i + 1) == getstatf(STAT_PLAYERNUM)) {
|
||||||
drawstring([x, g_height - 90], ftos(playerpoints[i]), [12, 12], TEXTCOLOR, 1, 0);
|
drawpic([3 + GetUltraWideOffset(), g_height - 97 - (i * 25)], "gfx/hud/moneyback.tga", [96, 24], [1,1,1], 1);
|
||||||
PointUpdate(x + 70, width, height, i + 1);
|
drawstring([x, g_height - 92 - (i * 25)], ftos(playerpoints[i]), [12, 12], TEXTCOLOR, 1, 0);
|
||||||
} else {
|
} else {
|
||||||
pointwidth = stringwidth(ftos(playerpoints[i]), 0, [12, 12]);
|
drawpic([-7 + GetUltraWideOffset(), g_height - 97 - (i * 25)], "gfx/hud/moneyback_condensed.tga", [96, 24], [1,1,1], 1);
|
||||||
x = (85 - pointwidth)/2 + GetUltraWideOffset();
|
drawstring([x - 9, g_height - 92 - (i * 25)], ftos(playerpoints[i]), [12, 12], TEXTCOLOR, 1, 0);
|
||||||
drawpic([-7 + GetUltraWideOffset(), (g_height - 95) - (25*i)], "gfx/hud/moneyback_condensed.tga", [96, 24], [1,1,1], 1);
|
|
||||||
drawstring([x, (g_height - 90) - (25*i)], ftos(playerpoints[i]), [12, 12], TEXTCOLOR, 1, 0);
|
|
||||||
PointUpdate(x + 70, width, height, i + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PointUpdate(x + 70, width, height, i + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue