]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
added MSVC 2012 projects
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 651d08e2269eb6b7cedcfba78e7707f51369ee14..9ddf949145dc691f83e200c3ffdad2bfc5e26019 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -177,8 +177,8 @@ static sizebuf_t    cmd_text;
 static unsigned char           cmd_text_buf[CMDBUFSIZE];
 void *cmd_text_mutex = NULL;
 
-#define Cbuf_LockThreadMutex() (cmd_text_mutex ? Thread_LockMutex(cmd_text_mutex),1 : 0)
-#define Cbuf_UnlockThreadMutex() (cmd_text_mutex ? Thread_UnlockMutex(cmd_text_mutex),1 : 0)
+#define Cbuf_LockThreadMutex() (void)(cmd_text_mutex ? Thread_LockMutex(cmd_text_mutex) : 0)
+#define Cbuf_UnlockThreadMutex() (void)(cmd_text_mutex ? Thread_UnlockMutex(cmd_text_mutex) : 0)
 
 /*
 ============
@@ -463,7 +463,8 @@ static void Cmd_StuffCmds_f (void)
 static void Cmd_Exec(const char *filename)
 {
        char *f;
-       qboolean isdefaultcfg = strlen(filename) >= 11 && !strcmp(filename + strlen(filename) - 11, "default.cfg");
+       size_t filenameLen = strlen(filename);
+       qboolean isdefaultcfg = filenameLen >= 11 && !strcmp(filename + filenameLen - 11, "default.cfg");
 
        if (!strcmp(filename, "config.cfg"))
        {
@@ -502,7 +503,7 @@ static void Cmd_Exec(const char *filename)
                // hipnotic mission pack has issues in their 'friendly monster' ai, which seem to attempt to attack themselves for some reason when findradius() returns non-solid entities.
                // hipnotic mission pack has issues with bobbing water entities 'jittering' between different heights on alternate frames at the default 0.0138889 ticrate, 0.02 avoids this issue
                // hipnotic mission pack has issues in their proximity mine sticking code, which causes them to bounce off.
-               if (gamemode == GAME_HIPNOTIC)
+               if (gamemode == GAME_HIPNOTIC || gamemode == GAME_QUOTH)
                        Cbuf_InsertText("\nsv_gameplayfix_blowupfallenzombies 0\nsys_ticrate 0.02\nsv_gameplayfix_slidemoveprojectiles 0\n\n");
                // rogue mission pack has a guardian boss that does not wake up if findradius returns one of the entities around its spawn area
                if (gamemode == GAME_ROGUE)
@@ -1199,15 +1200,15 @@ static void Cmd_List_f (void)
        {
                partial = Cmd_Argv (1);
                len = strlen(partial);
+               ispattern = (strchr(partial, '*') || strchr(partial, '?'));
        }
        else
        {
                partial = NULL;
                len = 0;
+               ispattern = false;
        }
 
-       ispattern = partial && (strchr(partial, '*') || strchr(partial, '?'));
-
        count = 0;
        for (cmd = cmd_functions; cmd; cmd = cmd->next)
        {