]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix red-coloring logic again
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 Sep 2009 09:21:51 +0000 (09:21 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 Sep 2009 09:21:51 +0000 (09:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9213 d7cf8633-e32d-0410-b094-e92efae38249

sbar.c

diff --git a/sbar.c b/sbar.c
index 586c9aaea2fd121da191f5b5f884e5c0f4bb6e6d..c6fcbf648fc57eb4c0950bb10f2c498a8dde31d9 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -1128,10 +1128,11 @@ void Sbar_ShowFPS(void)
                }
                framecount++;
                calc = framerate;
+               red = (calc < 1.0f);
 
                if(showfps.integer == 2)
                        dpsnprintf(fpsstring, sizeof(fpsstring), "%7.3f mspf", (1000.0 / calc));
-               else if ((red = (calc < 1.0f)))
+               else if (red)
                        dpsnprintf(fpsstring, sizeof(fpsstring), "%4i spf", (int)(1.0 / calc + 0.5));
                else
                        dpsnprintf(fpsstring, sizeof(fpsstring), "%4i fps", (int)(calc + 0.5));