]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Add prefix to VM_Warning indicating which VM it came from
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 15 Jul 2023 12:28:18 +0000 (22:28 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sat, 15 Jul 2023 12:28:18 +0000 (22:28 +1000)
A few messages include this but many don't, and in future there will be
less functions with SV or CL in their name.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
prvm_cmds.c

index d362aa72aa7bb19aaa209de70e7eca25af4c3331..9554aa449236835084c10fec42de5fbe488912a1 100644 (file)
@@ -32,7 +32,7 @@ void VM_Warning(prvm_prog_t *prog, const char *fmt, ...)
        dpvsnprintf(msg,sizeof(msg),fmt,argptr);
        va_end(argptr);
 
-       Con_Printf(CON_WARN "%s", msg);
+       Con_Printf(CON_WARN "%s VM warning: %s", prog->name, msg);
 
        // TODO: either add a cvar/cmd to control the state dumping or replace some of the calls with Con_Printf [9/13/2006 Black]
        if(prvm_backtraceforwarnings.integer && recursive != host.realtime) // NOTE: this compares to the time, just in case if PRVM_PrintState causes a Host_Error and keeps recursive set