]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
Fix GCC 12 warns: comparison will always evaluate as true
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index 687c9499bd23dc0909f05237e48ffa5e18b641dd..854c62a683e656bc01709e7a1c063e0d02f5679f 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -1214,7 +1214,7 @@ void Sbar_ShowFPS(void)
                svtrace.fraction = 2.0;
                cltrace.fraction = 2.0;
                // ray hits models (even animated ones) and ignores translucent materials
-               if (SVVM_prog != NULL)
+               if (sv.active)
                        svtrace = SV_TraceLine(org, dest, MOVE_HITMODEL, NULL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT, collision_extendmovelength.value);
                cltrace = CL_TraceLine(org, dest, MOVE_HITMODEL, NULL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT, collision_extendmovelength.value, true, false, &hitnetentity, true, true);
                if (cltrace.hittexture)
@@ -1234,7 +1234,7 @@ void Sbar_ShowFPS(void)
                }
                else
                {
-                       if (CLVM_prog != NULL && cltrace.ent != NULL)
+                       if (cltrace.ent != NULL)
                        {
                                prvm_prog_t *prog = CLVM_prog;
                                dpsnprintf(entstring, sizeof(entstring), "client entity %i", (int)PRVM_EDICT_TO_PROG(cltrace.ent));