prog->error_cmd("%s: Bad string", prog->name);
}
-qbool PRVM_ConsoleCommand(prvm_prog_t *prog, const char *text, size_t textlen, int *func, qbool preserve_self, int curself, double ptime, qbool prog_loaded, const char *error_message)
+qbool PRVM_ConsoleCommand(prvm_prog_t *prog, const char *text, size_t textlen, int *func, qbool preserve_self, int curself, double ptime, const char *error_message)
{
int restorevm_tempstringsbuf_cursize;
int save_self = 0; // hush compiler warning
qbool r = false;
- if(!prog_loaded)
+ if(!prog->loaded)
return false;
if(func)
else
bindmap = 0; // consistent to "bind"
bind = Key_GetBind((int)PRVM_G_FLOAT(OFS_PARM0), bindmap);
- PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, bind, strlen(bind));
+ PRVM_G_INT(OFS_RETURN) = bind ? PRVM_SetTempString(prog, bind, strlen(bind)) : 0;
}
/*
else if (prog == CLVM_prog)
CL_LinkEdict(ent);
else
- Sys_Abort("PHYS_NudgeOutOfSolid: cannot be called from %s VM\n", prog->name);
+ Sys_Error("PHYS_NudgeOutOfSolid: cannot be called from %s VM\n", prog->name);
}
}