]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
add several more R_TimeReport calls for better analysis of csqc time
[xonotic/darkplaces.git] / clvm_cmds.c
index 1031110c811eb67d82cb001dfc770339c68aceac..ff8f3da462483a184bd238509916f14f56e8d198 100644 (file)
@@ -252,6 +252,8 @@ static void VM_CL_traceline (void)
        int             move, svent;
        prvm_edict_t    *ent;
 
+       R_TimeReport("pretraceline");
+
        VM_SAFEPARMCOUNTRANGE(4, 4, VM_CL_traceline);
 
        prog->xfunction->builtinsprofile += 30;
@@ -267,6 +269,7 @@ static void VM_CL_traceline (void)
        trace = CL_TraceLine(v1, v2, move, ent, CL_GenericHitSuperContentsMask(ent), CL_HitNetworkBrushModels(move), CL_HitNetworkPlayers(move), &svent, true);
 
        CL_VM_SetTraceGlobals(&trace, svent);
+       R_TimeReport("traceline");
 }
 
 /*
@@ -288,6 +291,7 @@ static void VM_CL_tracebox (void)
        int             move, svent;
        prvm_edict_t    *ent;
 
+       R_TimeReport("pretracebox");
        VM_SAFEPARMCOUNTRANGE(6, 8, VM_CL_tracebox); // allow more parameters for future expansion
 
        prog->xfunction->builtinsprofile += 30;
@@ -305,6 +309,7 @@ static void VM_CL_tracebox (void)
        trace = CL_TraceBox(v1, m1, m2, v2, move, ent, CL_GenericHitSuperContentsMask(ent), CL_HitNetworkBrushModels(move), CL_HitNetworkPlayers(move), &svent, true);
 
        CL_VM_SetTraceGlobals(&trace, svent);
+       R_TimeReport("tracebox");
 }
 
 trace_t CL_Trace_Toss (prvm_edict_t *tossent, prvm_edict_t *ignore, int *svent)