From 64b7adb293caf6bd94c5d4d5d04f899a524ffa5e Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 14 Nov 2020 16:18:05 +0100 Subject: [PATCH] Get rid of an useless global --- qcsrc/client/view.qc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index c3a93cd05..51fbe195e 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -382,7 +382,6 @@ void update_mousepos() mousepos.y = bound(0, mousepos.y, vid_conheight); } -float showfps_prevfps; float showfps_prevfps_time; int showfps_framecounter; @@ -396,13 +395,13 @@ void fpscounter_update() showfps_framecounter += 1; if(currentTime - showfps_prevfps_time > STAT(SHOWFPS)) { - showfps_prevfps = showfps_framecounter/(currentTime - showfps_prevfps_time); + float fps = showfps_framecounter / (currentTime - showfps_prevfps_time); showfps_framecounter = 0; showfps_prevfps_time = currentTime; int channel = MSG_C2S; WriteHeader(channel, fpsreport); - WriteShort(channel, bound(0, rint(showfps_prevfps), 65535)); // prevent insane fps values + WriteShort(channel, bound(0, rint(fps), 65535)); // prevent insane fps values } } -- 2.39.2