mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-07 15:51:09 +00:00
Fix a couple of bugs with ezhud.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5568 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bf1bd72be4
commit
bdc2b01f11
1 changed files with 11 additions and 13 deletions
|
@ -327,11 +327,11 @@ static void QDECL Plug_Draw_Line(float x1, float y1, float x2, float y2)
|
||||||
}
|
}
|
||||||
static void QDECL Plug_Draw_Character(float x, float y, unsigned int character)
|
static void QDECL Plug_Draw_Character(float x, float y, unsigned int character)
|
||||||
{
|
{
|
||||||
int px, py;
|
float px, py;
|
||||||
if (qrenderer == QR_NONE)
|
if (qrenderer == QR_NONE)
|
||||||
return;
|
return;
|
||||||
Font_BeginString(font_default, x, y, &px, &py);
|
Font_BeginScaledString(font_default, x, y, 8, 8, &px, &py);
|
||||||
Font_DrawChar(x, y, CON_WHITEMASK, character);
|
Font_DrawScaleChar(px, py, CON_WHITEMASK, character);
|
||||||
Font_EndString(font_default);
|
Font_EndString(font_default);
|
||||||
}
|
}
|
||||||
static void QDECL Plug_Draw_CharacterH(float x, float y, float h, unsigned int flags, unsigned int charc)
|
static void QDECL Plug_Draw_CharacterH(float x, float y, float h, unsigned int flags, unsigned int charc)
|
||||||
|
@ -489,21 +489,19 @@ static void QDECL Plug_GetPlayerInfo(int playernum, plugclientinfo_t *out)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (playernum < -cl.splitclients || playernum >= MAX_CLIENTS)
|
//queries for the local seats
|
||||||
|
if (playernum < 0)
|
||||||
|
playernum = cl.playerview[-playernum-1].playernum;
|
||||||
|
|
||||||
|
if (playernum < 0 || playernum >= MAX_CLIENTS)
|
||||||
|
{
|
||||||
|
memset(out, 0, sizeof(*out));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
i = playernum;
|
i = playernum;
|
||||||
if (out)
|
if (out)
|
||||||
{
|
{
|
||||||
if (i < 0)
|
|
||||||
{
|
|
||||||
i = cl.playerview[-i-1].playernum;
|
|
||||||
if (i < 0)
|
|
||||||
{
|
|
||||||
memset(out, 0, sizeof(*out));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
out->bottomcolour = cl.players[i].rbottomcolor;
|
out->bottomcolour = cl.players[i].rbottomcolor;
|
||||||
out->topcolour = cl.players[i].rtopcolor;
|
out->topcolour = cl.players[i].rtopcolor;
|
||||||
out->frags = cl.players[i].frags;
|
out->frags = cl.players[i].frags;
|
||||||
|
|
Loading…
Reference in a new issue