]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
Clean up qtypes.h. Use stdbool.h on non-MSVC. Replace allcaps with lowercase
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index ce0c4013b26c9cb9bc7ae78f53e06e2d7941c0e0..83ff546c212d8c93f1fd6abd5ae2d2feb054a68d 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -328,7 +328,7 @@ void Cbuf_Execute (cmd_state_t *cmd)
                // better than CRASHING on overlong input lines that may SOMEHOW enter the buffer
                if(i >= MAX_INPUTLINE)
                {
-                       Con_Printf("Warning: console input buffer had an overlong line. Ignored.\n");
+                       Con_Warnf("Warning: console input buffer had an overlong line. Ignored.\n");
                        line[0] = 0;
                }
                else
@@ -525,6 +525,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sys_ticrate 0.01388889\n"
 "r_shadow_gloss 1\n"
 "r_shadow_bumpscale_basetexture 0\n"
+"csqc_polygons_defaultmaterial_nocullface 0\n"
                                );
                        break;
                case GAME_NEHAHRA:
@@ -549,6 +550,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sys_ticrate 0.01388889\n"
 "r_shadow_gloss 1\n"
 "r_shadow_bumpscale_basetexture 0\n"
+"csqc_polygons_defaultmaterial_nocullface 0\n"
                                );
                        break;
                // 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.
@@ -577,6 +579,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sys_ticrate 0.02\n"
 "r_shadow_gloss 1\n"
 "r_shadow_bumpscale_basetexture 0\n"
+"csqc_polygons_defaultmaterial_nocullface 0\n"
                                );
                        break;
                // rogue mission pack has a guardian boss that does not wake up if findradius returns one of the entities around its spawn area
@@ -602,6 +605,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sys_ticrate 0.01388889\n"
 "r_shadow_gloss 1\n"
 "r_shadow_bumpscale_basetexture 0\n"
+"csqc_polygons_defaultmaterial_nocullface 0\n"
                                );
                        break;
                case GAME_TENEBRAE:
@@ -626,6 +630,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sys_ticrate 0.01388889\n"
 "r_shadow_gloss 2\n"
 "r_shadow_bumpscale_basetexture 4\n"
+"csqc_polygons_defaultmaterial_nocullface 0\n"
                                );
                        break;
                case GAME_NEXUIZ:
@@ -650,6 +655,14 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sys_ticrate 0.01388889\n"
 "sv_gameplayfix_q2airaccelerate 1\n"
 "sv_gameplayfix_stepmultipletimes 1\n"
+"csqc_polygons_defaultmaterial_nocullface 1\n"
+                               );
+                       break;
+               case GAME_XONOTIC:
+               case GAME_VORETOURNAMENT:
+                       // compatibility for versions prior to 2020-05-25, this can be overridden in newer versions to get the default behavior and be consistent with FTEQW engine
+                       Cbuf_InsertText(cmd, "\n"
+"csqc_polygons_defaultmaterial_nocullface 1\n"
                                );
                        break;
                // Steel Storm: Burning Retribution csqc misinterprets CSQC_InputEvent if type is a value other than 0 or 1
@@ -674,6 +687,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sv_gameplayfix_downtracesupportsongroundflag 1\n"
 "sys_ticrate 0.01388889\n"
 "cl_csqc_generatemousemoveevents 0\n"
+"csqc_polygons_defaultmaterial_nocullface 1\n"
                                );
                        break;
                default:
@@ -696,6 +710,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
 "sv_gameplayfix_swiminbmodels 1\n"
 "sv_gameplayfix_downtracesupportsongroundflag 1\n"
 "sys_ticrate 0.01388889\n"
+"csqc_polygons_defaultmaterial_nocullface 0\n"
                                );
                        break;
                }
@@ -1107,9 +1122,9 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
        {
                // empty cvar name?
                if(alias)
-                       Con_Printf("Warning: Could not expand $ in alias %s\n", alias->name);
+                       Con_Warnf("Warning: Could not expand $ in alias %s\n", alias->name);
                else
-                       Con_Printf("Warning: Could not expand $\n");
+                       Con_Warnf("Warning: Could not expand $\n");
                return "$";
        }
 
@@ -1155,9 +1170,9 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
                if(required)
                {
                        if(alias)
-                               Con_Printf("Error: Could not expand $%s in alias %s\n", varname, alias->name);
+                               Con_Errorf("Error: Could not expand $%s in alias %s\n", varname, alias->name);
                        else
-                               Con_Printf("Error: Could not expand $%s\n", varname);
+                               Con_Errorf("Error: Could not expand $%s\n", varname);
                        return NULL;
                }
                else if(optional)
@@ -1167,9 +1182,9 @@ static const char *Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t va
                else
                {
                        if(alias)
-                               Con_Printf("Warning: Could not expand $%s in alias %s\n", varname, alias->name);
+                               Con_Warnf("Warning: Could not expand $%s in alias %s\n", varname, alias->name);
                        else
-                               Con_Printf("Warning: Could not expand $%s\n", varname);
+                               Con_Warnf("Warning: Could not expand $%s\n", varname);
                        dpsnprintf(varval, sizeof(varval), "$%s", varname);
                        return varval;
                }