From 9d3f89b3853eb703370d71c8e6de13be9b7393a4 Mon Sep 17 00:00:00 2001 From: Tim Bergeron Date: Mon, 18 Nov 2024 14:30:53 -0800 Subject: [PATCH] adjust autoid conditions a bit --- Quake/gl_screen.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index fe08946d..365b4f5c 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -2460,8 +2460,11 @@ void SCR_DrawNet (void) { if (!scr_shownet.value) return; + + if (cls.signon < SIGNONS) + return; - if (realtime - cl.last_received_message < 0.3) + if (realtime - cl.last_received_message < scr_shownet.value) return; if (cls.demoplayback) return; @@ -3136,6 +3139,9 @@ void SCR_SetupAutoID(void) char buf2[15]; const char* playmode; + char buf3[15]; + const char* mode; + //if (r_refdef.viewangles[ROLL] == 80) // dead, could rotate text? if (!scr_autoid.value || cls.state != ca_connected || cl.intermission || qeintermission || crxintermission) @@ -3145,6 +3151,7 @@ void SCR_SetupAutoID(void) { obs = Info_GetKey(cl.scores[cl.realviewentity - 1].userinfo, "observer", buf, sizeof(buf)); playmode = Info_GetKey(cl.serverinfo, "playmode", buf2, sizeof(buf2)); + mode = Info_GetKey(cl.serverinfo, "mode", buf3, sizeof(buf3)); if (cl.modtype == 1 || cl.modtype == 4) // mods with observer keys { @@ -3158,7 +3165,7 @@ void SCR_SetupAutoID(void) ((int)scr_autoid.value != 2) ) && ( - (strcmp(playmode, "match") != 0) || // allow in pre-match if value 2 + ((strcmp(playmode, "match") != 0 || (strcmp(mode, "dm") != 0 && strcmp(mode, "ctf") != 0))) || // allow in pre-match if value 2 (cl.matchinp || (int)scr_autoid.value != 2) ) ) { @@ -3225,6 +3232,10 @@ void SCR_DrawAutoID(void) GL_SetCanvas(CANVAS_AUTOID); + const char* observing = "null"; + char buf[10]; + observing = Info_GetKey(cl.scores[cl.realviewentity - 1].userinfo, "observing", buf, sizeof(buf)); // userinfo + for (i = 0; i < autoid_count; i++) { // Adjust coordinates according to the scaling factor @@ -3243,6 +3254,9 @@ void SCR_DrawAutoID(void) name_length = strlen(formatted_name); + if (!strcmp(formatted_name, observing)) + continue; + Draw_FillPlayer(x - 4 * name_length - 1, y - 1, (name_length * 8) + 2, 11, CL_PLColours_Parse("0x000000"), decimal_part); Draw_String(x - 4 * name_length, y, formatted_name);