]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of an useless global
authorterencehill <piuntn@gmail.com>
Sat, 14 Nov 2020 15:18:05 +0000 (16:18 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 14 Nov 2020 15:18:05 +0000 (16:18 +0100)
qcsrc/client/view.qc

index c3a93cd052dac5aec44f354521596e826a33a9df..51fbe195ec72eb7dd4bf379abf730c5665beae14 100644 (file)
@@ -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
        }
 }