]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
Draw coronas with the same cscale whether gl_flashblend or not. Fixes brightness
[xonotic/darkplaces.git] / sv_main.c
index b10a67d9f13424b0119993cc0ddc28ac41ae1688..0a0dd9820c36aa8639a822d6c1ebafd1f31bcd67 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -413,7 +413,14 @@ prvm_required_field_t sv_reqglobals[] =
 #undef PRVM_DECLARE_function
 };
 
+static void SV_Slowmo_c(char *string)
+{
+       double value;
+       value = atof(string);
 
+       if(value < 0.00001 && value != 0)
+               string[0] = '0', string[1] = 0;
+}
 
 //============================================================================
 
@@ -447,7 +454,9 @@ void SV_Init (void)
        Cvar_RegisterVariable (&csqc_usedemoprogs);
 
        Cmd_AddCommand(&cmd_server, "sv_saveentfile", SV_SaveEntFile_f, "save map entities to .ent file (to allow external editing)");
+       Cmd_AddCommand(&cmd_client, "sv_saveentfile", SV_SaveEntFile_f, "save map entities to .ent file (to allow external editing)");
        Cmd_AddCommand(&cmd_server, "sv_areastats", SV_AreaStats_f, "prints statistics on entity culling during collision traces");
+       Cmd_AddCommand(&cmd_client, "sv_areastats", SV_AreaStats_f, "prints statistics on entity culling during collision traces");
        Cmd_AddCommand(&cmd_serverfromclient, "sv_startdownload", SV_StartDownload_f, "begins sending a file to the client (network protocol use only)");
        Cmd_AddCommand(&cmd_serverfromclient, "download", SV_Download_f, "downloads a specified file from the server");
        Cmd_AddCommand(&cmd_client, "sv_startdownload", Cmd_ForwardToServer_f, "begins sending a file to the client (network protocol use only)");
@@ -465,6 +474,7 @@ void SV_Init (void)
        Cvar_RegisterVariable (&samelevel);
        Cvar_RegisterVariable (&skill);
        Cvar_RegisterVariable (&slowmo);
+       Cvar_RegisterCallback (&slowmo, SV_Slowmo_c);
        Cvar_RegisterVariable (&sv_accelerate);
        Cvar_RegisterVariable (&sv_aim);
        Cvar_RegisterVariable (&sv_airaccel_qw);