]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_exec.c
merged q1bsp and q3bsp surface rendering
[xonotic/darkplaces.git] / pr_exec.c
index 5a5243e90dbb74039fe7578c9669ddeb3f90428a..c516fec7f2e6820ac648d3806252a1bb77016851 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);
        }
@@ -380,7 +386,7 @@ void PR_ExecuteProgram (func_t fnum, const char *errormessage)
        eval_t  *ptr;
        int             profile, startprofile, cachedpr_trace, exitdepth;
 
-       if (!fnum || fnum >= progs->numfunctions)
+       if (!fnum || fnum >= (unsigned) progs->numfunctions)
        {
                if (pr_global_struct->self)
                        ED_Print(PROG_TO_EDICT(pr_global_struct->self));