Discard "Rocket Arena" in favor of "OmegA Weapon Arena"
This commit is contained in:
@@ -126,7 +126,7 @@ static void MessageMenu_Draw( void ) {
|
||||
y = 188;
|
||||
for(i=0; s_confirm.lines[i]; i++)
|
||||
{
|
||||
UI_DrawProportionalString( 320, y, s_confirm.lines[i], s_confirm.style, color_red );
|
||||
UI_DrawProportionalString( 320, y, s_confirm.lines[i], s_confirm.style, color_white );
|
||||
y += 18;
|
||||
}
|
||||
|
||||
@@ -144,8 +144,8 @@ ConfirmMenu_Draw
|
||||
*/
|
||||
static void ConfirmMenu_Draw( void ) {
|
||||
UI_DrawNamedPic( 142, 118, 359, 256, ART_CONFIRM_FRAME );
|
||||
UI_DrawProportionalString( 320, 204, s_confirm.question, s_confirm.style, color_red );
|
||||
UI_DrawProportionalString( s_confirm.slashX, 265, "/", UI_LEFT|UI_INVERSE, color_red );
|
||||
UI_DrawProportionalString( 320, 204, s_confirm.question, s_confirm.style, color_white );
|
||||
UI_DrawProportionalString( s_confirm.slashX, 265, "/", UI_LEFT|UI_INVERSE, color_white );
|
||||
|
||||
Menu_Draw( &s_confirm.menu );
|
||||
|
||||
@@ -212,7 +212,7 @@ void UI_ConfirmMenu_Style( const char *question, int style, void (*draw)( void )
|
||||
s_confirm.yes.generic.x = l1;
|
||||
s_confirm.yes.generic.y = 264;
|
||||
s_confirm.yes.string = "YES";
|
||||
s_confirm.yes.color = color_red;
|
||||
s_confirm.yes.color = color_white;
|
||||
s_confirm.yes.style = UI_LEFT;
|
||||
|
||||
s_confirm.no.generic.type = MTYPE_PTEXT;
|
||||
@@ -222,7 +222,7 @@ void UI_ConfirmMenu_Style( const char *question, int style, void (*draw)( void )
|
||||
s_confirm.no.generic.x = l3;
|
||||
s_confirm.no.generic.y = 264;
|
||||
s_confirm.no.string = "NO";
|
||||
s_confirm.no.color = color_red;
|
||||
s_confirm.no.color = color_white;
|
||||
s_confirm.no.style = UI_LEFT;
|
||||
|
||||
Menu_AddItem( &s_confirm.menu, &s_confirm.yes );
|
||||
@@ -282,7 +282,7 @@ void UI_Message( const char **lines ) {
|
||||
s_confirm.yes.generic.x = l1;
|
||||
s_confirm.yes.generic.y = 280;
|
||||
s_confirm.yes.string = "OK";
|
||||
s_confirm.yes.color = color_red;
|
||||
s_confirm.yes.color = color_white;
|
||||
s_confirm.yes.style = UI_LEFT;
|
||||
|
||||
Menu_AddItem( &s_confirm.menu, &s_confirm.yes );
|
||||
|
||||
@@ -192,7 +192,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.team.generic.id = ID_TEAM;
|
||||
s_ingame.team.generic.callback = InGame_Event;
|
||||
s_ingame.team.string = "START";
|
||||
s_ingame.team.color = color_red;
|
||||
s_ingame.team.color = color_white;
|
||||
s_ingame.team.style = UI_CENTER|UI_SMALLFONT;
|
||||
|
||||
y += INGAME_MENU_VERTICAL_SPACING;
|
||||
@@ -203,7 +203,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.addbots.generic.id = ID_ADDBOTS;
|
||||
s_ingame.addbots.generic.callback = InGame_Event;
|
||||
s_ingame.addbots.string = "ADD BOTS";
|
||||
s_ingame.addbots.color = color_red;
|
||||
s_ingame.addbots.color = color_white;
|
||||
s_ingame.addbots.style = UI_CENTER|UI_SMALLFONT;
|
||||
if( !trap_Cvar_VariableValue( "sv_running" ) || !trap_Cvar_VariableValue( "bot_enable" ) || (trap_Cvar_VariableValue( "g_gametype" ) == GT_SINGLE_PLAYER)) {
|
||||
s_ingame.addbots.generic.flags |= QMF_GRAYED;
|
||||
@@ -217,7 +217,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.removebots.generic.id = ID_REMOVEBOTS;
|
||||
s_ingame.removebots.generic.callback = InGame_Event;
|
||||
s_ingame.removebots.string = "REMOVE BOTS";
|
||||
s_ingame.removebots.color = color_red;
|
||||
s_ingame.removebots.color = color_white;
|
||||
s_ingame.removebots.style = UI_CENTER|UI_SMALLFONT;
|
||||
if( !trap_Cvar_VariableValue( "sv_running" ) || !trap_Cvar_VariableValue( "bot_enable" ) || (trap_Cvar_VariableValue( "g_gametype" ) == GT_SINGLE_PLAYER)) {
|
||||
s_ingame.removebots.generic.flags |= QMF_GRAYED;
|
||||
@@ -231,7 +231,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.teamorders.generic.id = ID_TEAMORDERS;
|
||||
s_ingame.teamorders.generic.callback = InGame_Event;
|
||||
s_ingame.teamorders.string = "TEAM ORDERS";
|
||||
s_ingame.teamorders.color = color_red;
|
||||
s_ingame.teamorders.color = color_white;
|
||||
s_ingame.teamorders.style = UI_CENTER|UI_SMALLFONT;
|
||||
if( !(trap_Cvar_VariableValue( "g_gametype" ) >= GT_TEAM) || (trap_Cvar_VariableValue( "g_gametype" ) == GT_LMS ) ) {
|
||||
s_ingame.teamorders.generic.flags |= QMF_GRAYED;
|
||||
@@ -253,7 +253,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.vote.generic.id = ID_VOTE;
|
||||
s_ingame.vote.generic.callback = InGame_Event;
|
||||
s_ingame.vote.string = "CALL VOTE";
|
||||
s_ingame.vote.color = color_red;
|
||||
s_ingame.vote.color = color_white;
|
||||
s_ingame.vote.style = UI_CENTER|UI_SMALLFONT;
|
||||
trap_GetConfigString( CS_SERVERINFO, info, MAX_INFO_STRING );
|
||||
if( atoi( Info_ValueForKey(info,"g_allowVote") )==0 || trap_Cvar_VariableValue("g_gametype")==GT_SINGLE_PLAYER ) {
|
||||
@@ -268,7 +268,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.setup.generic.id = ID_SETUP;
|
||||
s_ingame.setup.generic.callback = InGame_Event;
|
||||
s_ingame.setup.string = "SETUP";
|
||||
s_ingame.setup.color = color_red;
|
||||
s_ingame.setup.color = color_white;
|
||||
s_ingame.setup.style = UI_CENTER|UI_SMALLFONT;
|
||||
|
||||
y += INGAME_MENU_VERTICAL_SPACING;
|
||||
@@ -279,7 +279,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.server.generic.id = ID_SERVERINFO;
|
||||
s_ingame.server.generic.callback = InGame_Event;
|
||||
s_ingame.server.string = "SERVER INFO";
|
||||
s_ingame.server.color = color_red;
|
||||
s_ingame.server.color = color_white;
|
||||
s_ingame.server.style = UI_CENTER|UI_SMALLFONT;
|
||||
|
||||
y += INGAME_MENU_VERTICAL_SPACING;
|
||||
@@ -290,7 +290,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.restart.generic.id = ID_RESTART;
|
||||
s_ingame.restart.generic.callback = InGame_Event;
|
||||
s_ingame.restart.string = "RESTART ARENA";
|
||||
s_ingame.restart.color = color_red;
|
||||
s_ingame.restart.color = color_white;
|
||||
s_ingame.restart.style = UI_CENTER|UI_SMALLFONT;
|
||||
if( !trap_Cvar_VariableValue( "sv_running" ) ) {
|
||||
s_ingame.restart.generic.flags |= QMF_GRAYED;
|
||||
@@ -304,7 +304,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.resume.generic.id = ID_RESUME;
|
||||
s_ingame.resume.generic.callback = InGame_Event;
|
||||
s_ingame.resume.string = "RESUME GAME";
|
||||
s_ingame.resume.color = color_red;
|
||||
s_ingame.resume.color = color_white;
|
||||
s_ingame.resume.style = UI_CENTER|UI_SMALLFONT;
|
||||
|
||||
y += INGAME_MENU_VERTICAL_SPACING;
|
||||
@@ -315,7 +315,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.leave.generic.id = ID_LEAVEARENA;
|
||||
s_ingame.leave.generic.callback = InGame_Event;
|
||||
s_ingame.leave.string = "LEAVE ARENA";
|
||||
s_ingame.leave.color = color_red;
|
||||
s_ingame.leave.color = color_white;
|
||||
s_ingame.leave.style = UI_CENTER|UI_SMALLFONT;
|
||||
|
||||
y += INGAME_MENU_VERTICAL_SPACING;
|
||||
@@ -326,7 +326,7 @@ void InGame_MenuInit( void ) {
|
||||
s_ingame.quit.generic.id = ID_QUIT;
|
||||
s_ingame.quit.generic.callback = InGame_Event;
|
||||
s_ingame.quit.string = "EXIT GAME";
|
||||
s_ingame.quit.color = color_red;
|
||||
s_ingame.quit.color = color_white;
|
||||
s_ingame.quit.style = UI_CENTER|UI_SMALLFONT;
|
||||
|
||||
Menu_AddItem( &s_ingame.menu, &s_ingame.frame );
|
||||
|
||||
@@ -140,6 +140,25 @@ static int gametype_remap2[] = {
|
||||
10,
|
||||
11 }; //this works and should increment for more gametypes
|
||||
|
||||
|
||||
static const char *s_weapon_names[] = {
|
||||
"Off",
|
||||
"Gauntlet",
|
||||
"Machinegun",
|
||||
"Shotgun",
|
||||
"Grenade Launcher",
|
||||
"Rocket Launcher",
|
||||
"Lightning",
|
||||
"Railgun",
|
||||
"Plasmagun",
|
||||
"BFG",
|
||||
"Nailgun",
|
||||
"Proximity Launcher",
|
||||
"Chaingun",
|
||||
"All Weapons",
|
||||
NULL
|
||||
};
|
||||
|
||||
static void UI_ServerOptionsMenu( qboolean multiplayer );
|
||||
|
||||
|
||||
@@ -294,7 +313,7 @@ static void StartServer_Update( void ) {
|
||||
|
||||
// set the map name
|
||||
info = UI_GetArenaInfoByNumber( s_startserver.maplist[ s_startserver.currentmap ]);
|
||||
Q_strncpyz( s_startserver.mapname.string, Info_ValueForKey( info, "map" ), MAX_NAMELENGTH);
|
||||
Q_strncpyz( s_startserver.mapname.string, Info_ValueForKey( info, "longname" ), MAX_NAMELENGTH);
|
||||
}
|
||||
|
||||
Q_strupr( s_startserver.mapname.string );
|
||||
@@ -388,7 +407,6 @@ static void StartServer_MenuEvent( void* ptr, int event ) {
|
||||
break;
|
||||
|
||||
case ID_AUTONEXTMAP:
|
||||
//trap_Cvar_SetValue( "cg_alwaysWeaponBar", s_preferences.alwaysweaponbar.curvalue );
|
||||
trap_Cvar_SetValue( "g_autonextmap", s_startserver.autonextmap.curvalue );
|
||||
break;
|
||||
|
||||
@@ -735,7 +753,7 @@ typedef struct {
|
||||
//Here are the elimination stuff
|
||||
menuradiobutton_s oneway;
|
||||
menuradiobutton_s instantgib;
|
||||
menuradiobutton_s rockets;
|
||||
menulist_s weaponarena;
|
||||
menuradiobutton_s cheats;
|
||||
menulist_s lmsMode;
|
||||
menulist_s botSkill;
|
||||
@@ -849,7 +867,7 @@ static void ServerOptions_Start( void ) {
|
||||
int pmove;
|
||||
int lan;
|
||||
int instantgib;
|
||||
int rockets;
|
||||
int weaponarena;
|
||||
int cheats;
|
||||
int oneway;
|
||||
int lmsMode;
|
||||
@@ -867,7 +885,7 @@ static void ServerOptions_Start( void ) {
|
||||
lan = s_serveroptions.lan.curvalue;
|
||||
pmove = s_serveroptions.pmove.curvalue;
|
||||
instantgib = s_serveroptions.instantgib.curvalue;
|
||||
rockets = s_serveroptions.rockets.curvalue;
|
||||
weaponarena = s_serveroptions.weaponarena.curvalue;
|
||||
cheats = s_serveroptions.cheats.curvalue;
|
||||
oneway = s_serveroptions.oneway.curvalue;
|
||||
//Sago: For some reason you need to add 1 to curvalue to get the UI to show the right thing (fixed?)
|
||||
@@ -957,7 +975,7 @@ static void ServerOptions_Start( void ) {
|
||||
trap_Cvar_SetValue( "sv_pure", pure );
|
||||
trap_Cvar_SetValue( "sv_lanForceRate", lan );
|
||||
trap_Cvar_SetValue( "g_instantgib", instantgib );
|
||||
trap_Cvar_SetValue( "g_rockets", rockets );
|
||||
trap_Cvar_SetValue( "g_weaponarena", weaponarena );
|
||||
trap_Cvar_SetValue( "g_lms_mode", lmsMode);
|
||||
trap_Cvar_SetValue( "elimination_ctf_oneway", oneway );
|
||||
switch(pmove) {
|
||||
@@ -1023,6 +1041,15 @@ static void ServerOptions_Start( void ) {
|
||||
}
|
||||
|
||||
|
||||
static void ServerOptions_UpdateMenuItems( void ) {
|
||||
if ( s_serveroptions.instantgib.curvalue == 1 ) {
|
||||
s_serveroptions.weaponarena.generic.flags |= QMF_GRAYED;
|
||||
trap_Cvar_SetValue( "g_weaponarena", 0 );
|
||||
} else {
|
||||
s_serveroptions.weaponarena.generic.flags &= ~QMF_GRAYED;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerOptions_InitPlayerItems
|
||||
@@ -1200,11 +1227,11 @@ static void ServerOptions_StatusBar_Instantgib( void* ptr ) {
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerOptions_StatusBar_Allrockets
|
||||
ServerOptions_StatusBar_WeaponArena
|
||||
=================
|
||||
*/
|
||||
static void ServerOptions_StatusBar_Allrockets( void* ptr ) {
|
||||
UI_DrawString( 320, 440, "Only Rocket launcher with Inf. ammo", UI_CENTER|UI_SMALLFONT, colorWhite );
|
||||
static void ServerOptions_StatusBar_WeaponArena( void* ptr ) {
|
||||
UI_DrawString( 320, 440, "Only one weapon with Inf. ammo", UI_CENTER|UI_SMALLFONT, colorWhite );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1392,6 +1419,11 @@ static void ServerOptions_InitBotNames( void ) {
|
||||
}
|
||||
|
||||
|
||||
void ServerOptions_MenuDraw( void ) {
|
||||
ServerOptions_UpdateMenuItems();
|
||||
Menu_Draw( &s_serveroptions.menu );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerOptions_SetMenuItems
|
||||
@@ -1478,7 +1510,7 @@ static void ServerOptions_SetMenuItems( void ) {
|
||||
s_serveroptions.pure.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "sv_pure" ) );
|
||||
s_serveroptions.lan.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "sv_lanforcerate" ) );
|
||||
s_serveroptions.instantgib.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "g_instantgib" ) );
|
||||
s_serveroptions.rockets.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "g_rockets" ) );
|
||||
s_serveroptions.weaponarena.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "g_weaponarena" ) );
|
||||
s_serveroptions.lmsMode.curvalue = Com_Clamp( 0, 3, trap_Cvar_VariableValue("g_lms_mode") );
|
||||
s_serveroptions.oneway.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "elimination_ctf_oneway" ) );
|
||||
s_serveroptions.pmove.curvalue = 0;
|
||||
@@ -1574,6 +1606,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
||||
|
||||
s_serveroptions.menu.wrapAround = qtrue;
|
||||
s_serveroptions.menu.fullscreen = qtrue;
|
||||
s_serveroptions.menu.draw = ServerOptions_MenuDraw;
|
||||
|
||||
s_serveroptions.banner.generic.type = MTYPE_BTEXT;
|
||||
s_serveroptions.banner.generic.x = 320;
|
||||
@@ -1678,12 +1711,13 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
||||
|
||||
//Rockets option
|
||||
y += BIGCHAR_HEIGHT+2;
|
||||
s_serveroptions.rockets.generic.type = MTYPE_RADIOBUTTON;
|
||||
s_serveroptions.rockets.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
s_serveroptions.rockets.generic.x = OPTIONS_X;
|
||||
s_serveroptions.rockets.generic.y = y;
|
||||
s_serveroptions.rockets.generic.name = "All rockets:";
|
||||
s_serveroptions.rockets.generic.statusbar = ServerOptions_StatusBar_Allrockets;
|
||||
s_serveroptions.weaponarena.generic.type = MTYPE_SPINCONTROL;
|
||||
s_serveroptions.weaponarena.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
s_serveroptions.weaponarena.generic.x = OPTIONS_X;
|
||||
s_serveroptions.weaponarena.generic.y = y;
|
||||
s_serveroptions.weaponarena.generic.name = "Weapon Arena:";
|
||||
s_serveroptions.weaponarena.itemnames = s_weapon_names;
|
||||
s_serveroptions.weaponarena.generic.statusbar = ServerOptions_StatusBar_WeaponArena;
|
||||
|
||||
|
||||
//Cheats option
|
||||
@@ -1840,7 +1874,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
||||
}
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.pure );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.instantgib );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.rockets );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.weaponarena );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.cheats );
|
||||
if( s_serveroptions.gametype == GT_LMS) {
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.lmsMode );
|
||||
|
||||
Reference in New Issue
Block a user