]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_exec.c
skip surfaces with no triangles in Q3BSP rendering code to avoid a R_Mesh_Draw warning
[xonotic/darkplaces.git] / pr_exec.c
index 5a5243e90dbb74039fe7578c9669ddeb3f90428a..19d6d8ee9d3ad0ea5733c410a9361996e22ad3ae 100644 (file)
--- a/pr_exec.c
+++ b/pr_exec.c
@@ -215,6 +215,12 @@ void PR_Profile_f (void)
        mfunction_t *f, *best;
        int i, num, max/*, howmany*/;
 
+       if (!sv.active)
+       {
+               Con_Printf("no server running, can't profile\n");
+               return;
+       }
+
        //howmany = 10;
        //if (Cmd_Argc() == 2)
        //      howmany = atoi(Cmd_Argv(1));
@@ -248,7 +254,7 @@ void PR_PrintState(void)
        int i;
        if (pr_xfunction)
        {
-               for (i = -4;i <= 0;i++)
+               for (i = -7;i <= 0;i++)
                        if (pr_xstatement + i >= pr_xfunction->first_statement)
                                PR_PrintStatement (pr_statements + pr_xstatement + i);
        }