Permalink
Browse files

[Shared] Add loadhud to MP, make SP reload strings and menus

  • Loading branch information...
Razish committed Dec 6, 2017
1 parent 1d125c7 commit 7f23591f11dbb144709db9dd1d823587e7f8ff40
Showing with 20 additions and 8 deletions.
  1. +7 −8 code/cgame/cg_consolecmds.cpp
  2. +13 −0 codemp/cgame/cg_consolecmds.c
@@ -27,6 +27,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#include "cg_headers.h"
#include "cg_media.h" //just for cgs....
#include "ui/ui_shared.h"
void CG_TargetCommand_f( void );
extern qboolean player_locked;
@@ -196,17 +197,15 @@ void CG_ToggleLAGoggles( void )
}
}
void CG_LoadHud_f( void )
{
const char *hudSet;
hudSet = cg_hudFiles.string;
if (hudSet[0] == '\0')
{
void CG_LoadHud_f( void ) {
const char *hudSet = cg_hudFiles.string;
if ( hudSet[0] == '\0' ) {
hudSet = "ui/jahud.txt";
}
CG_LoadMenus(hudSet);
String_Init();
Menu_Reset();
CG_LoadMenus( hudSet );
}
typedef struct {
@@ -27,6 +27,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#include "cg_local.h"
#include "game/bg_saga.h"
#include "ui/ui_shared.h"
/*
=================
@@ -271,6 +272,17 @@ static void CG_SiegeCompleteCvarUpdate_f(void)
CG_SiegeBriefingDisplay(SIEGETEAM_TEAM2, 1);
}
static void CG_LoadHud_f( void ) {
const char *hudSet = cg_hudFiles.string;
if ( hudSet[0] == '\0' ) {
hudSet = "ui/jahud.txt";
}
String_Init();
Menu_Reset();
CG_LoadMenus( hudSet );
}
typedef struct consoleCommand_s {
const char *cmd;
void (*func)(void);
@@ -290,6 +302,7 @@ static consoleCommand_t commands[] = {
{ "invnext", CG_NextInventory_f },
{ "invprev", CG_PrevInventory_f },
{ "loaddeferred", CG_LoadDeferredPlayers },
{ "loadhud", CG_LoadHud_f },
{ "nextframe", CG_TestModelNextFrame_f },
{ "nextskin", CG_TestModelNextSkin_f },
{ "prevframe", CG_TestModelPrevFrame_f },

0 comments on commit 7f23591

Please sign in to comment.