]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_exec.c
changed shadow projection length to use model->radius*2 instead of model->radius
[xonotic/darkplaces.git] / prvm_exec.c
index ab166f35bbe3b733864e290501a01a0f4b3b64bf..4c6ae4527201b44984476dd8d28bc64694b18550 100644 (file)
@@ -199,7 +199,7 @@ void PRVM_Profile_f (void)
                Con_Print("prvm_profile <program name>\n");
                return;
        }
-       
+
        PRVM_Begin;
        if(!PRVM_SetProgFromString(Cmd_Argv(1)))
                return;
@@ -227,6 +227,7 @@ void PRVM_Profile_f (void)
                        num++;
                        best->profile = 0;
                        best->builtinsprofile = 0;
+                       best->callcount = 0;
                }
        } while (best);
 
@@ -245,7 +246,7 @@ void PRVM_CrashAll()
                PRVM_SetProg(i);
                PRVM_Crash();
        }
-       
+
        prog = oldprog;
 }
 
@@ -265,6 +266,9 @@ void PRVM_PrintState(void)
 
 void PRVM_Crash()
 {
+       if (prog == NULL)
+               return;
+
        if( prog->depth > 0 )
        {
                Con_Printf("QuakeC crash report for %s:\n", PRVM_NAME);
@@ -381,7 +385,7 @@ PRVM_ExecuteProgram
 extern cvar_t prvm_boundscheck;
 extern cvar_t prvm_traceqc;
 extern int             PRVM_ED_FindFieldOffset (const char *field);
-extern ddef_t* PRVM_ED_FindGlobal(const char *name); 
+extern ddef_t* PRVM_ED_FindGlobal(const char *name);
 void PRVM_ExecuteProgram (func_t fnum, const char *errormessage)
 {
        dstatement_t    *st;