Reset the quad factor to 4, import bot logic from ioq3
This commit is contained in:
@@ -244,7 +244,7 @@ static cvarTable_t gameCvarTable[] = {
|
||||
{ &g_gravityModifier, "g_gravityModifier", "1", 0, 0, qtrue },
|
||||
{ &g_damageModifier, "g_damageModifier", "0", 0, 0, qtrue },
|
||||
{ &g_knockback, "g_knockback", "1000", 0, 0, qtrue },
|
||||
{ &g_quadfactor, "g_quadfactor", "3", 0, 0, qtrue },
|
||||
{ &g_quadfactor, "g_quadfactor", "4", 0, 0, qtrue },
|
||||
{ &g_weaponRespawn, "g_weaponrespawn", "5", 0, 0, qtrue },
|
||||
{ &g_weaponTeamRespawn, "g_weaponTeamRespawn", "30", 0, 0, qtrue },
|
||||
{ &g_forcerespawn, "g_forcerespawn", "20", 0, 0, qtrue },
|
||||
|
@@ -205,9 +205,7 @@ static void Main_MenuDraw( void ) {
|
||||
UI_DrawProportionalString( 320, 372, "", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 400, "Illusion Arena (c) 2025 Yakumo Laboratories", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 414, "Based on OpenArena (c) 2005-2012 OpenArena Team", UI_CENTER|UI_SMALLFONT, color );
|
||||
|
||||
if((int)trap_Cvar_VariableValue("protocol")!=71)
|
||||
UI_DrawString( 0, 480-14, va("^7Protocol: %i",(int)trap_Cvar_VariableValue("protocol")), UI_SMALLFONT, color);
|
||||
UI_DrawString( 0, 480-14, va("^7Protocol: %i",(int)trap_Cvar_VariableValue("protocol")), UI_SMALLFONT, color);
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +220,7 @@ and that local cinematics are killed
|
||||
*/
|
||||
void UI_MainMenu( void ) {
|
||||
int y;
|
||||
int style = UI_CENTER | UI_DROPSHADOW;
|
||||
int style = UI_LEFT | UI_DROPSHADOW;
|
||||
|
||||
trap_Cvar_Set( "sv_killserver", "1" );
|
||||
trap_Cvar_SetValue( "handicap", 100 ); //Reset handicap during server change, it must be ser per game
|
||||
@@ -262,7 +260,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.singleplayer.generic.id = ID_SINGLEPLAYER;
|
||||
s_main.singleplayer.generic.callback = Main_MenuEvent;
|
||||
s_main.singleplayer.string = "SINGLE PLAYER";
|
||||
s_main.singleplayer.color = color_red;
|
||||
s_main.singleplayer.color = color_orange;
|
||||
s_main.singleplayer.style = style;
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
@@ -273,7 +271,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.multiplayer.generic.id = ID_MULTIPLAYER;
|
||||
s_main.multiplayer.generic.callback = Main_MenuEvent;
|
||||
s_main.multiplayer.string = "MULTIPLAYER";
|
||||
s_main.multiplayer.color = color_red;
|
||||
s_main.multiplayer.color = color_orange;
|
||||
s_main.multiplayer.style = style;
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
@@ -284,7 +282,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.setup.generic.id = ID_SETUP;
|
||||
s_main.setup.generic.callback = Main_MenuEvent;
|
||||
s_main.setup.string = "SETUP";
|
||||
s_main.setup.color = color_red;
|
||||
s_main.setup.color = color_orange;
|
||||
s_main.setup.style = style;
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
@@ -295,7 +293,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.demos.generic.id = ID_DEMOS;
|
||||
s_main.demos.generic.callback = Main_MenuEvent;
|
||||
s_main.demos.string = "DEMOS";
|
||||
s_main.demos.color = color_red;
|
||||
s_main.demos.color = color_orange;
|
||||
s_main.demos.style = style;
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
@@ -306,7 +304,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.challenges.generic.id = ID_CHALLENGES;
|
||||
s_main.challenges.generic.callback = Main_MenuEvent;
|
||||
s_main.challenges.string = "STATISTICS";
|
||||
s_main.challenges.color = color_red;
|
||||
s_main.challenges.color = color_orange;
|
||||
s_main.challenges.style = style;
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
@@ -317,7 +315,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.mods.generic.id = ID_MODS;
|
||||
s_main.mods.generic.callback = Main_MenuEvent;
|
||||
s_main.mods.string = "MODS";
|
||||
s_main.mods.color = color_red;
|
||||
s_main.mods.color = color_orange;
|
||||
s_main.mods.style = style;
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
@@ -328,7 +326,7 @@ void UI_MainMenu( void ) {
|
||||
s_main.exit.generic.id = ID_EXIT;
|
||||
s_main.exit.generic.callback = Main_MenuEvent;
|
||||
s_main.exit.string = "EXIT";
|
||||
s_main.exit.color = color_red;
|
||||
s_main.exit.color = color_orange;
|
||||
s_main.exit.style = style;
|
||||
|
||||
Menu_AddItem( &s_main.menu, &s_main.singleplayer );
|
||||
|
@@ -38,8 +38,6 @@ static qhandle_t sliderBar;
|
||||
static qhandle_t sliderButton_0;
|
||||
static qhandle_t sliderButton_1;
|
||||
|
||||
// Original colors
|
||||
/*
|
||||
vec4_t menu_text_color = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
vec4_t menu_dim_color = {0.0f, 0.0f, 0.0f, 0.75f};
|
||||
vec4_t color_black = {0.00f, 0.00f, 0.00f, 1.00f};
|
||||
@@ -51,34 +49,13 @@ vec4_t color_orange = {1.00f, 0.43f, 0.00f, 1.00f};
|
||||
vec4_t color_red = {1.00f, 0.00f, 0.00f, 1.00f};
|
||||
vec4_t color_dim = {0.00f, 0.00f, 0.00f, 0.25f};
|
||||
|
||||
vec4_t pulse_color = {1.00f, 1.00f, 1.00f, 1.00f};
|
||||
vec4_t pulse_color = {1.00f, 1.00f, 1.00f, 1.00f};
|
||||
vec4_t text_color_disabled = {0.50f, 0.50f, 0.50f, 1.00f}; // light gray
|
||||
vec4_t text_color_normal = {1.00f, 0.43f, 0.00f, 1.00f}; // light orange
|
||||
vec4_t text_color_highlight = {1.00f, 1.00f, 0.00f, 1.00f}; // bright yellow
|
||||
vec4_t listbar_color = {1.00f, 0.43f, 0.00f, 0.30f}; // transluscent orange
|
||||
vec4_t text_color_status = {1.00f, 1.00f, 1.00f, 1.00f}; // bright white
|
||||
|
||||
*/
|
||||
// NEW AND IMPLOVED colors
|
||||
vec4_t menu_text_color = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
vec4_t menu_dim_color = {0.0f, 0.0f, 0.0f, 0.75f};
|
||||
vec4_t color_black = {0.00f, 0.00f, 0.00f, 1.00f};
|
||||
vec4_t color_white = {1.00f, 1.00f, 1.00f, 1.00f};
|
||||
vec4_t color_yellow = {1.00f, 1.00f, 0.00f, 1.00f};
|
||||
vec4_t color_blue = {0.00f, 0.00f, 1.00f, 1.00f};
|
||||
vec4_t color_lightOrange = {0.30f, 0.45f, 0.58f, 1.00f };
|
||||
vec4_t color_orange = {0.30f, 0.45f, 0.58f, 1.00f};
|
||||
vec4_t color_red = {0.55f, 0.65f, 0.73f, 1.00f};
|
||||
vec4_t color_dim = {0.00f, 0.00f, 0.00f, 0.25f};
|
||||
|
||||
// current color scheme
|
||||
vec4_t pulse_color = {1.00f, 1.00f, 1.00f, 1.00f};
|
||||
vec4_t text_color_disabled = {0.35f, 0.24f, 0.29f, 1.00f}; // light gray
|
||||
vec4_t text_color_normal = {0.30f, 0.45f, 0.58f, 1.00f}; // light orange
|
||||
vec4_t text_color_highlight = {0.76f, 0.89f, 0.93f, 1.00f}; // bright yellow
|
||||
vec4_t listbar_color = {0.13f, 0.26f, 0.38f, 0.30f}; // transluscent orange
|
||||
vec4_t text_color_status = {1.00f, 1.00f, 1.00f, 1.00f}; // bright white
|
||||
|
||||
// action widget
|
||||
static void Action_Init( menuaction_s *a );
|
||||
static void Action_Draw( menuaction_s *a );
|
||||
|
@@ -1282,113 +1282,102 @@ static void ServerOptions_LevelshotDraw( void *self ) {
|
||||
UI_DrawString( x, y, gametype_items[gametype_remap2[s_serveroptions.gametype]], UI_CENTER|UI_SMALLFONT, color_orange );
|
||||
}
|
||||
|
||||
|
||||
static void ServerOptions_InitBotNames( void ) {
|
||||
int count;
|
||||
int n;
|
||||
const char *arenaInfo;
|
||||
const char *botInfo;
|
||||
char *p;
|
||||
char *bot;
|
||||
char bots[MAX_INFO_STRING];
|
||||
int count;
|
||||
int n;
|
||||
const char *arenaInfo;
|
||||
const char *botInfo;
|
||||
char *p;
|
||||
char *bot;
|
||||
char bots[MAX_INFO_STRING];
|
||||
|
||||
//this SHOULD work
|
||||
if( s_serveroptions.gametype >= GT_TEAM && s_serveroptions.gametype != GT_LMS ) {
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[1], "gargoyle", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[2], "kyonshi", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[3], "grism", 16 );
|
||||
if( s_serveroptions.gametype != GT_TEAM ) {
|
||||
s_serveroptions.playerType[3].curvalue = 2;
|
||||
}
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[4], "merman", 16 );
|
||||
s_serveroptions.playerType[4].curvalue = 2;
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[5], "skelebot", 16 );
|
||||
s_serveroptions.playerType[5].curvalue = 2;
|
||||
if( s_serveroptions.gametype >= GT_TEAM ) {
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[1], "grunt", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[2], "major", 16 );
|
||||
if( s_serveroptions.gametype == GT_TEAM ) {
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[3], "visor", 16 );
|
||||
}
|
||||
else {
|
||||
s_serveroptions.playerType[3].curvalue = 2;
|
||||
}
|
||||
s_serveroptions.playerType[4].curvalue = 2;
|
||||
s_serveroptions.playerType[5].curvalue = 2;
|
||||
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[6], "sergei", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[7], "assassin", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[8], "grunt", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[9], "skelebot", 16 );
|
||||
if( s_serveroptions.gametype != GT_TEAM ) {
|
||||
s_serveroptions.playerType[9].curvalue = 2;
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[6], "sarge", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[7], "grunt", 16 );
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[8], "major", 16 );
|
||||
if( s_serveroptions.gametype == GT_TEAM ) {
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[9], "visor", 16 );
|
||||
}
|
||||
else {
|
||||
s_serveroptions.playerType[9].curvalue = 2;
|
||||
}
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[10], "merman", 16 );
|
||||
|
||||
s_serveroptions.playerType[10].curvalue = 2;
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[11], "skelebot", 16 );
|
||||
s_serveroptions.playerType[11].curvalue = 2;
|
||||
s_serveroptions.playerType[11].curvalue = 2;
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// The first slot is reserved for an human
|
||||
count = 1;
|
||||
|
||||
count = 1; // skip the first slot, reserved for a human
|
||||
|
||||
// get info for this map
|
||||
// Get info for this map
|
||||
arenaInfo = UI_GetArenaInfoByMap( s_serveroptions.mapnamebuffer );
|
||||
|
||||
// get the bot info - we'll seed with them if any are listed
|
||||
// Get the bot info
|
||||
// We'll seed with them if any are listed
|
||||
Q_strncpyz( bots, Info_ValueForKey( arenaInfo, "bots" ), sizeof(bots) );
|
||||
p = &bots[0];
|
||||
while( *p && count < PLAYER_SLOTS ) {
|
||||
//skip spaces
|
||||
while( *p && *p == ' ' ) {
|
||||
p++;
|
||||
}
|
||||
if( !p ) {
|
||||
break;
|
||||
}
|
||||
p = &bots[0];
|
||||
while( *p && count < PLAYER_SLOTS ) {
|
||||
//skip spaces
|
||||
while( *p && *p == ' ' ) {
|
||||
p++;
|
||||
}
|
||||
if( !*p ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// mark start of bot name
|
||||
bot = p;
|
||||
// mark start of bot name
|
||||
bot = p;
|
||||
|
||||
// skip until space of null
|
||||
while( *p && *p != ' ' ) {
|
||||
p++;
|
||||
}
|
||||
if( *p ) {
|
||||
*p++ = 0;
|
||||
}
|
||||
// skip until space of null
|
||||
while( *p && *p != ' ' ) {
|
||||
p++;
|
||||
}
|
||||
if( *p ) {
|
||||
*p++ = 0;
|
||||
}
|
||||
|
||||
botInfo = UI_GetBotInfoByName( bot );
|
||||
bot = Info_ValueForKey( botInfo, "name" );
|
||||
|
||||
if(!Q_stricmp(bot,""))
|
||||
bot = "Sarge";
|
||||
botInfo = UI_GetBotInfoByName( bot );
|
||||
if( !botInfo )
|
||||
{
|
||||
botInfo = UI_GetBotInfoByNumber( count );
|
||||
}
|
||||
bot = Info_ValueForKey( botInfo, "name" );
|
||||
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[count], bot, sizeof(s_serveroptions.playerNameBuffers[count]) );
|
||||
count++;
|
||||
}
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[count], bot, sizeof(s_serveroptions.playerNameBuffers[count]) );
|
||||
count++;
|
||||
}
|
||||
|
||||
// set the rest of the bot slots to to other bots
|
||||
for( n = count; n < PLAYER_SLOTS; n++ ) {
|
||||
switch(n%4){
|
||||
case 0:
|
||||
strcpy( s_serveroptions.playerNameBuffers[n], "Grunt" );
|
||||
break;
|
||||
case 1:
|
||||
strcpy( s_serveroptions.playerNameBuffers[n], "Merman" );
|
||||
break;
|
||||
case 2:
|
||||
strcpy( s_serveroptions.playerNameBuffers[n], "Kyonshi" );
|
||||
break;
|
||||
default:
|
||||
strcpy( s_serveroptions.playerNameBuffers[n], "Skelebot" );
|
||||
}
|
||||
}
|
||||
// Set the rest of the bot slots to "---"
|
||||
for( n = count; n < PLAYER_SLOTS; n++ ) {
|
||||
strcpy( s_serveroptions.playerNameBuffers[n], "--------" );
|
||||
}
|
||||
|
||||
// pad up to #8 as open slots
|
||||
for( ;count < 8; count++ ) {
|
||||
s_serveroptions.playerType[count].curvalue = 0;
|
||||
}
|
||||
// Pad up to #8 as open slots
|
||||
for( ;count < 8; count++ ) {
|
||||
s_serveroptions.playerType[count].curvalue = 0;
|
||||
}
|
||||
|
||||
// close off the rest by default
|
||||
for( ;count < PLAYER_SLOTS; count++ ) {
|
||||
if( s_serveroptions.playerType[count].curvalue == 1 ) {
|
||||
s_serveroptions.playerType[count].curvalue = 2;
|
||||
}
|
||||
}
|
||||
// Close off the rest of the slots by default
|
||||
for( ;count < PLAYER_SLOTS; count++ ) {
|
||||
if( s_serveroptions.playerType[count].curvalue == 1 ) {
|
||||
s_serveroptions.playerType[count].curvalue = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerOptions_SetMenuItems
|
||||
@@ -1404,7 +1393,6 @@ static void ServerOptions_SetMenuItems( void ) {
|
||||
Com_sprintf( s_serveroptions.fraglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_ffa_fraglimit" ) ) );
|
||||
Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_ffa_timelimit" ) ) );
|
||||
break;
|
||||
|
||||
case GT_TOURNAMENT:
|
||||
Com_sprintf( s_serveroptions.fraglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_tourney_fraglimit" ) ) );
|
||||
Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_tourney_timelimit" ) ) );
|
||||
@@ -1443,13 +1431,11 @@ static void ServerOptions_SetMenuItems( void ) {
|
||||
case GT_ELIMINATION:
|
||||
Com_sprintf( s_serveroptions.flaglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_elimination_capturelimit" ) ) );
|
||||
Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_elimination_timelimit" ) ) );
|
||||
//s_serveroptions.friendlyfire.curvalue = (int)Com_Clamp( 0, 1, trap_Cvar_VariableValue( "ui_elimination_friendly" ) );
|
||||
break;
|
||||
|
||||
case GT_CTF_ELIMINATION:
|
||||
Com_sprintf( s_serveroptions.flaglimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_ctf_elimination_capturelimit" ) ) );
|
||||
Com_sprintf( s_serveroptions.timelimit.field.buffer, 4, "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_ctf_elimination_timelimit" ) ) );
|
||||
//s_serveroptions.friendlyfire.curvalue = (int)Com_Clamp( 0, 1, trap_Cvar_VariableValue( "ui_ctf_elimination_friendly" ) );
|
||||
break;
|
||||
|
||||
case GT_LMS:
|
||||
|
Reference in New Issue
Block a user