Skip to content

Commit

Permalink
mint-arena: Fix loadhud command not applying hud menu hacks
Browse files Browse the repository at this point in the history
Using loadhud command to reload HUD (instead of vid_restart) resulted
in menu hacks not being applied to fix voice menu and power up area
screen placement for widescreen.
  • Loading branch information
zturtleman committed Oct 13, 2018
1 parent f5b407f commit 89e27ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/cgame/cg_consolecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ static void CG_LoadHud_f( void) {
}

CG_LoadMenus(hudSet);
CG_HudMenuHacks();
menuScoreboard = NULL;
}

Expand Down
1 change: 1 addition & 0 deletions code/cgame/cg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,7 @@ void CG_UpdateCvars( void );
int CG_CrosshairPlayer( int localPlayerNum );
int CG_LastAttacker( int localPlayerNum );
void CG_LoadMenus(const char *menuFile);
void CG_HudMenuHacks( void );
void CG_DistributeKeyEvent( int key, qboolean down, unsigned time, connstate_t state, int joystickNum, int axisNum );
void CG_DistributeCharEvent( int key, connstate_t state );
void CG_KeyEvent(int key, qboolean down);
Expand Down
13 changes: 12 additions & 1 deletion code/cgame/cg_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,6 @@ CG_LoadHudMenu();
void CG_LoadHudMenu( void ) {
char buff[1024];
const char *hudSet;
menuDef_t *menu;

cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip;
cgDC.setColor = &trap_R_SetColor;
Expand Down Expand Up @@ -2514,6 +2513,18 @@ void CG_LoadHudMenu( void ) {
}

CG_LoadMenus(hudSet);
CG_HudMenuHacks();
}

/*
=================
CG_HudMenuHacks
=================
*/
void CG_HudMenuHacks( void ) {
menuDef_t *menu;

Init_Display(&cgDC);

// make voice chat head stick to left side in widescreen
menu = Menus_FindByName( "voiceMenu" );
Expand Down

0 comments on commit 89e27ff

Please sign in to comment.