8000 mint-arena: Fix loadhud command not applying hud menu hacks · Turtle-Arena/turtle-arena-code@89e27ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 89e27ff

Browse files
committed
mint-arena: Fix loadhud command not applying hud menu hacks
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.
1 parent f5b407f commit 89e27ff

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

code/cgame/cg_consolecmds.c

+1
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ static void CG_LoadHud_f( void) {
585585
}
586586

587587
CG_LoadMenus(hudSet);
588+
CG_HudMenuHacks();
588589
menuScoreboard = NULL;
589590
}
590591

code/cgame/cg_local.h

+1
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ void CG_UpdateCvars( void );
15151515
int CG_CrosshairPlayer( int localPlayerNum );
15161516
int CG_LastAttacker( int localPlayerNum );
15171517
void CG_LoadMenus(const char *menuFile);
1518+
void CG_HudMenuHacks( void );
15181519
void CG_DistributeKeyEvent( int key, qboolean down, unsigned time, connstate_t state, int joystickNum, int axisNum );
15191520
void CG_DistributeCharEvent( int key, connstate_t state );
15201521
void CG_KeyEvent(int key, qboolean down);

code/cgame/cg_main.c

+12-1
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,6 @@ CG_LoadHudMenu();
24472447
void CG_LoadHudMenu( void ) {
24482448
char buff[1024];
24492449
const char *hudSet;
2450-
menuDef_t *menu;
24512450

24522451
cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip;
24532452
cgDC.setColor = &trap_R_SetColor;
@@ -2514,6 +2513,18 @@ void CG_LoadHudMenu( void ) {
25142513
}
25152514

25162515
CG_LoadMenus(hudSet);
2516+
CG_HudMenuHacks();
2517+
}
2518+
2519+
/*
2520+
=================
2521+
CG_HudMenuHacks
2522+
=================
2523+
*/
2524+
void CG_HudMenuHacks( void ) {
2525+
menuDef_t *menu;
2526+
2527+
Init_Display(&cgDC);
25172528

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

0 commit comments

Comments
 (0)
0