]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
Reimpl. the cvar alias system. Reimpl. the cvar hash table as a distinct type
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index 77218e4b4b8349bed1b96230c12862734a004f2f..25fd8acb816e049f6362d08be9c8855d658129d3 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -1581,7 +1581,7 @@ void M_Menu_Options_f(cmd_state_t *cmd)
        m_entersound = true;
 }
 
-extern cvar_t slowmo;
+extern cvar_t host_timescale;
 extern dllhandle_t jpeg_dll;
 extern cvar_t gl_texture_anisotropy;
 extern cvar_t r_textshadow;
@@ -1615,8 +1615,8 @@ static void M_Menu_Options_AdjustSliders (int dir)
                        Cvar_SetValueQuick (&cl_backspeed, 400);
                }
        }
-       else if (options_cursor == optnum++) Cvar_SetValueQuick(&showfps, !showfps.integer);
-       else if (options_cursor == optnum++) {f = !(showdate.integer && showtime.integer);Cvar_SetValueQuick(&showdate, f);Cvar_SetValueQuick(&showtime, f);}
+       else if (options_cursor == optnum++) Cvar_SetValueQuick(&cl_showfps, !cl_showfps.integer);
+       else if (options_cursor == optnum++) {f = !(cl_showdate.integer && cl_showtime.integer);Cvar_SetValueQuick(&cl_showdate, f);Cvar_SetValueQuick(&cl_showtime, f);}
        else if (options_cursor == optnum++) ;
        else if (options_cursor == optnum++) Cvar_SetValueQuick(&r_hdr_scenebrightness, bound(1, r_hdr_scenebrightness.value + dir * 0.0625, 4));
        else if (options_cursor == optnum++) Cvar_SetValueQuick(&v_contrast, bound(1, v_contrast.value + dir * 0.0625, 4));
@@ -1692,8 +1692,8 @@ static void M_Options_Draw (void)
        M_Options_PrintCheckbox("          Invert Mouse", true, m_pitch.value < 0);
        M_Options_PrintSlider(  "         Field of View", true, scr_fov.integer, 1, 170);
        M_Options_PrintCheckbox("            Always Run", true, cl_forwardspeed.value > 200);
-       M_Options_PrintCheckbox("        Show Framerate", true, showfps.integer);
-       M_Options_PrintCheckbox("    Show Date and Time", true, showdate.integer && showtime.integer);
+       M_Options_PrintCheckbox("        Show Framerate", true, cl_showfps.integer);
+       M_Options_PrintCheckbox("    Show Date and Time", true, cl_showdate.integer && cl_showtime.integer);
        M_Options_PrintCommand( "     Custom Brightness", true);
        M_Options_PrintSlider(  "       Game Brightness", true, r_hdr_scenebrightness.value, 1, 4);
        M_Options_PrintSlider(  "            Brightness", true, v_contrast.value, 1, 2);
@@ -5227,7 +5227,7 @@ void MVM_error_cmd(const char *format, ...)
        key_dest = key_game;
 
        // init the normal menu now -> this will also correct the menu router pointers
-       MR_SetRouting (TRUE);
+       MR_SetRouting (true);
 
        // reset the active scene, too (to be on the safe side ;))
    R_SelectScene( RST_CLIENT );
@@ -5306,6 +5306,9 @@ static void MP_Draw (void)
        // TODO: this needs to be exposed to R_SetView (or something similar) ASAP [2/5/2008 Andreas]
        r_refdef.scene.time = realtime;
 
+       // free memory for resources that are no longer referenced
+       PRVM_GarbageCollection(prog);
+
        // FIXME: this really shouldnt error out lest we have a very broken refdef state...?
        // or does it kill the server too?
        PRVM_G_FLOAT(OFS_PARM0) = vid.width;
@@ -5447,7 +5450,7 @@ void MR_Restart(void)
 {
        if(MR_Shutdown)
                MR_Shutdown ();
-       MR_SetRouting (FALSE);
+       MR_SetRouting (false);
 }
 
 static void MR_Restart_f(cmd_state_t *cmd)
@@ -5607,7 +5610,7 @@ void MR_Init(void)
        // the normal quake menu only the first time
 // COMMANDLINEOPTION: Client: -useqmenu causes the first time you open the menu to use the quake menu, then reverts to menu.dat (if forceqmenu is 0)
        if(COM_CheckParm("-useqmenu"))
-               MR_SetRouting (TRUE);
+               MR_SetRouting (true);
        else
-               MR_SetRouting (FALSE);
+               MR_SetRouting (false);
 }