X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=menu.c;h=ce154097118e91e32c8aef969f53f0c789caa89a;hp=481be8784393b9455046bf412bfb0ae8e816b2a2;hb=00b6d96fd1220b1df82036c445389ae19a08709e;hpb=acdd55a695050845def0dce89ea84b06cb990b0a;ds=sidebyside diff --git a/menu.c b/menu.c index 481be878..ce154097 100644 --- a/menu.c +++ b/menu.c @@ -282,7 +282,7 @@ static void M_ToggleMenu(int mode) { if(mode == 0) return; // the menu is off, and we want it off - M_Menu_Main_f (&cmd_client); + M_Menu_Main_f (cmd_local); } else { @@ -2838,9 +2838,9 @@ video_resolution_t video_resolutions_hardcoded[] = // this is the number of the default mode (640x480) in the list above int video_resolutions_hardcoded_count = sizeof(video_resolutions_hardcoded) / sizeof(*video_resolutions_hardcoded) - 1; -#define VIDEO_ITEMS 11 +#define VIDEO_ITEMS 10 static int video_cursor = 0; -static int video_cursor_table[VIDEO_ITEMS] = {68, 88, 96, 104, 112, 120, 128, 136, 144, 152, 168}; +static int video_cursor_table[VIDEO_ITEMS] = {68, 88, 96, 104, 112, 120, 128, 136, 144, 152}; static int menu_video_resolution; video_resolution_t *video_resolutions; @@ -3287,7 +3287,7 @@ static void M_Quit_Key(cmd_state_t *cmd, int key, int ascii) case 'Y': case 'y': - Host_Quit_f(cmd); + host.state = host_shutdown; break; default: @@ -4910,7 +4910,7 @@ void M_Draw (void) void M_KeyEvent (int key, int ascii, qbool downevent) { - cmd_state_t *cmd = &cmd_client; + cmd_state_t *cmd = cmd_local; if (!downevent) return; switch (m_state) @@ -5212,6 +5212,10 @@ void MVM_error_cmd(const char *format, ...) va_start (argptr, format); dpvsnprintf (errorstring, sizeof(errorstring), format, argptr); va_end (argptr); + + if (host.framecount < 3) + Sys_Error("Menu_Error: %s\n", errorstring); + Con_Printf( "Menu_Error: %s\n", errorstring ); if( !processingError ) { @@ -5236,8 +5240,7 @@ void MVM_error_cmd(const char *format, ...) R_SelectScene( RST_CLIENT ); // Let video start at least - if(host.state != host_init) - Host_AbortCurrentFrame(); + Host_AbortCurrentFrame(); } static void MVM_begin_increase_edicts(prvm_prog_t *prog) @@ -5266,7 +5269,7 @@ static void MVM_count_edicts(prvm_prog_t *prog) for (i=0 ; inum_edicts ; i++) { ent = PRVM_EDICT_NUM(i); - if (ent->priv.required->free) + if (ent->free) continue; active++; } @@ -5375,7 +5378,7 @@ static void MP_Shutdown (void) static void MP_Init (void) { prvm_prog_t *prog = MVM_prog; - PRVM_Prog_Init(prog, &cmd_client); + PRVM_Prog_Init(prog, cmd_local); prog->edictprivate_size = 0; // no private struct used prog->name = "menu"; @@ -5467,7 +5470,7 @@ static void Call_MR_ToggleMenu_f(cmd_state_t *cmd) { int m; m = ((Cmd_Argc(cmd) < 2) ? -1 : atoi(Cmd_Argv(cmd, 1))); - Host_StartVideo(); + CL_StartVideo(); if(MR_ToggleMenu) MR_ToggleMenu(m); }