]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
Remove Con_Warnf and Errorf. Use macros to change color and identify the message
[xonotic/darkplaces.git] / prvm_cmds.c
index 2723076c73dc0d881b78eec47d09af8bd299e135..65fc3a181d0e2b0fc121c566637b856897be8ccc 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_Warn(msg);
+       Con_Printf(CON_WARN "%s", 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
@@ -108,7 +108,7 @@ void VM_FrameBlendFromFrameGroupBlend(frameblend_t *frameblend, const framegroup
                return;
        }
 
-       nolerp = (model->type == mod_sprite) ? !r_lerpsprites.integer : !r_lerpmodels.integer;
+       nolerp = ((model->type == mod_sprite) ? !r_lerpsprites.integer : !r_lerpmodels.integer) || (model->nolerp == true);
        numframes = model->numframes;
        for (k = 0, g = framegroupblend;k < MAX_FRAMEGROUPBLENDS;k++, g++)
        {
@@ -331,7 +331,7 @@ void VM_error(prvm_prog_t *prog)
        char string[VM_STRINGTEMP_LENGTH];
 
        VM_VarString(prog, 0, string, sizeof(string));
-       Con_Errorf("======%s ERROR in %s:\n%s\n", prog->name, PRVM_GetString(prog, prog->xfunction->s_name), string);
+       Con_Printf(CON_ERROR "======%s ERROR in %s:\n%s\n", prog->name, PRVM_GetString(prog, prog->xfunction->s_name), string);
        ed = PRVM_PROG_TO_EDICT(PRVM_allglobaledict(self));
        PRVM_ED_Print(prog, ed, NULL);
 
@@ -354,11 +354,11 @@ void VM_objerror(prvm_prog_t *prog)
        char string[VM_STRINGTEMP_LENGTH];
 
        VM_VarString(prog, 0, string, sizeof(string));
-       Con_Errorf("======OBJECT ERROR======\n"); // , prog->name, PRVM_GetString(prog->xfunction->s_name), string); // or include them? FIXME
+       Con_Printf(CON_ERROR "======OBJECT ERROR======\n"); // , prog->name, PRVM_GetString(prog->xfunction->s_name), string); // or include them? FIXME
        ed = PRVM_PROG_TO_EDICT(PRVM_allglobaledict(self));
        PRVM_ED_Print(prog, ed, NULL);
        PRVM_ED_Free (prog, ed);
-       Con_Errorf("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information\n", prog->name, PRVM_GetString(prog, prog->xfunction->s_name), string);
+       Con_Printf(CON_ERROR "%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information\n", prog->name, PRVM_GetString(prog, prog->xfunction->s_name), string);
 }
 
 /*