From 2000954a2c22ae6b8401cc8a3debccc7f84e4cf1 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Mon, 3 Mar 2003 19:20:44 +0000 Subject: [PATCH] Whitespace, and a workaround for show_* misplacement. --- libs/video/renderer/r_screen.c | 4 ++-- qw/source/cl_parse.c | 8 ++++---- qw/source/cl_screen.c | 7 +++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libs/video/renderer/r_screen.c b/libs/video/renderer/r_screen.c index 79c79f934..3de490af4 100644 --- a/libs/video/renderer/r_screen.c +++ b/libs/video/renderer/r_screen.c @@ -327,7 +327,7 @@ SCR_DrawFPS (void) } x = hudswap ? vid.width - ((strlen (st) * 8) + i) : i; - y = vid.height - r_lineadj - 8; + y = vid.height - sb_lines - 8; Draw_String (x, y, st); } @@ -363,7 +363,7 @@ SCR_DrawTime (void) // Print it at far left/right of screen x = hudswap ? (vid.width - ((strlen (st) * 8) + 8)) : 8; - y = vid.height - (r_lineadj + 8); + y = vid.height - sb_lines - 8; Draw_String (x, y, st); } diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index 918020696..a0f6a0445 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -1291,9 +1291,9 @@ CL_ParseServerMessage (void) if (!cls.demoplayback2) { MSG_ReadAngleV (net_message, cl.viewangles); } else { - j = MSG_ReadByte(net_message); - //fixangle |= 1 << j; - if (j != Cam_TrackNum()) { + j = MSG_ReadByte (net_message); +// fixangle |= 1 << j; + if (j != Cam_TrackNum ()) { MSG_ReadAngle (net_message); MSG_ReadAngle (net_message); MSG_ReadAngle (net_message); @@ -1418,7 +1418,7 @@ CL_ParseServerMessage (void) // automatic fraglogging (by elmex) // XXX: Should this _really_ called here? if (!cls.demoplayback) - Sbar_LogFrags(); + Sbar_LogFrags (); break; case svc_finale: diff --git a/qw/source/cl_screen.c b/qw/source/cl_screen.c index 10bf16dc8..8cca5b877 100644 --- a/qw/source/cl_screen.c +++ b/qw/source/cl_screen.c @@ -56,6 +56,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "r_cvar.h" #include "sbar.h" + static void SCR_DrawNet (void) { @@ -77,8 +78,10 @@ CL_NetStats (void) return; if (cls.state != ca_active) return; + x = hudswap ? vid.width - 104 : 0; y = vid.height - sb_lines - 16; + // request new ping times every two seconds if (!cls.demoplayback && realtime - cl.last_ping_request > 2) { cl.last_ping_request = realtime; @@ -87,6 +90,7 @@ CL_NetStats (void) } if (show_ping->int_val) { int ping = cl.players[cl.playernum].ping; + ping = bound (0, ping, 999); Draw_String (x, y, va ("%3d ms", ping)); x+= 48; @@ -94,7 +98,7 @@ CL_NetStats (void) x += 56; } if (show_ping->int_val && show_pl->int_val) { - Draw_String(x, y, "/"); + Draw_String (x, y, "/"); x += 8; } if (show_pl->int_val) { @@ -120,7 +124,6 @@ static SCR_Func scr_funcs[] = { 0 }; - void CL_UpdateScreen (double realtime) {