]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
Try to load the uppercase variants of various image files as well
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 83ff546c212d8c93f1fd6abd5ae2d2feb054a68d..4f13c0a9f578bcdb7f92623cbba3e3d136ad892d 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -237,14 +237,13 @@ Cbuf_Execute_Deferred --blub
 */
 static void Cbuf_Execute_Deferred (cmd_state_t *cmd)
 {
-       static double oldrealtime = 0;
        cmddeferred_t *defcmd, *prev;
        double eat;
-       if (realtime - oldrealtime < 0 || realtime - oldrealtime > 1800) oldrealtime = realtime;
-       eat = realtime - oldrealtime;
+       if (realtime - cmd->deferred_oldrealtime < 0 || realtime - cmd->deferred_oldrealtime > 1800) cmd->deferred_oldrealtime = realtime;
+       eat = realtime - cmd->deferred_oldrealtime;
        if (eat < (1.0 / 120.0))
                return;
-       oldrealtime = realtime;
+       cmd->deferred_oldrealtime = realtime;
        prev = NULL;
        defcmd = cmd->deferred_list;
        while(defcmd)
@@ -1443,7 +1442,8 @@ static void Cmd_Apropos_f(cmd_state_t *cmd)
                if (!matchpattern_with_separator(cvar->name, partial, true, "", false))
                if (!matchpattern_with_separator(cvar->description, partial, true, "", false))
                        continue;
-               Con_Printf ("cvar ^3%s^7 is \"%s\" [\"%s\"] %s\n", cvar->name, cvar->string, cvar->defstring, cvar->description);
+               Con_Printf ("cvar ");
+               Cvar_PrintHelp(cvar, true);
                count++;
        }
        for (func = cmd->userdefined->csqc_functions; func; func = func->next)
@@ -2019,6 +2019,8 @@ A complete command line has been parsed, so try to execute it
 FIXME: lookupnoadd the token to speed search?
 ============
 */
+extern hook_t *csqc_concmd;
+
 void Cmd_ExecuteString (cmd_state_t *cmd, const char *text, cmd_source_t src, qboolean lockmutex)
 {
        int oldpos;
@@ -2040,7 +2042,7 @@ void Cmd_ExecuteString (cmd_state_t *cmd, const char *text, cmd_source_t src, qb
        {
                if (!strcasecmp(cmd->argv[0], func->name))
                {
-                       if (func->csqcfunc && CL_VM_ConsoleCommand(text))       //[515]: csqc
+                       if (func->csqcfunc && Hook_Call(csqc_concmd, text)->bval)       //[515]: csqc
                                goto done;
                        break;
                }