mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 04:30:43 +00:00
don't segfault if the client player temp info key is null (can happen in
mvd)
This commit is contained in:
parent
998d68a833
commit
533a74aa75
1 changed files with 4 additions and 2 deletions
|
@ -815,6 +815,7 @@ Sbar_TeamOverlay (void)
|
|||
int pavg, plow, phigh, i, k, l, x, y;
|
||||
qpic_t *pic;
|
||||
team_t *tm;
|
||||
info_key_t *player_team = cl.players[cl.playernum].team;
|
||||
|
||||
if (!cl.teamplay) { // FIXME: if not teamplay, why teamoverlay?
|
||||
Sbar_DeathmatchOverlay (0);
|
||||
|
@ -874,7 +875,7 @@ Sbar_TeamOverlay (void)
|
|||
snprintf (num, sizeof (num), "%5i", tm->players);
|
||||
Draw_String (x + 104 + 88, y, num);
|
||||
|
||||
if (strnequal (cl.players[cl.playernum].team->value, tm->team, 16)) {
|
||||
if (player_team && strnequal (player_team->value, tm->team, 16)) {
|
||||
Draw_Character (x + 104 - 8, y, 16);
|
||||
Draw_Character (x + 104 + 32, y, 17);
|
||||
}
|
||||
|
@ -1626,6 +1627,7 @@ Sbar_MiniDeathmatchOverlay (void)
|
|||
int numlines, top, bottom, f, i, k, x, y;
|
||||
char num[12];
|
||||
player_info_t *s;
|
||||
info_key_t *player_team = cl.players[cl.playernum].team;
|
||||
team_t *tm;
|
||||
|
||||
if (vid.width < 512 || !sb_lines)
|
||||
|
@ -1723,7 +1725,7 @@ Sbar_MiniDeathmatchOverlay (void)
|
|||
snprintf (num, sizeof (num), "%5i", tm->frags);
|
||||
Draw_String (x + 40, y, num);
|
||||
|
||||
if (strnequal (cl.players[cl.playernum].team->value, tm->team, 16)) {
|
||||
if (player_team && strnequal (player_team->value, tm->team, 16)) {
|
||||
Draw_Character (x - 8, y, 16);
|
||||
Draw_Character (x + 32, y, 17);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue