bots are now added via arena file

This commit is contained in:
q3rally 2021-07-08 21:12:39 +00:00
parent 30a4363ed2
commit 782f65048a
5 changed files with 36 additions and 26 deletions

View file

@ -346,7 +346,7 @@ typedef enum
{ {
MS_NUMSTARTS, MS_NUMSTARTS,
MS_LAPS, MS_LAPS,
MS_TRACKLENGTH, MS_LAPTIME,
MS_NUMCHECKPOINTS, MS_NUMCHECKPOINTS,
MS_NUMOBSERVERSPOTS, MS_NUMOBSERVERSPOTS,
MS_NUMWEAPONS, MS_NUMWEAPONS,

View file

@ -226,31 +226,31 @@ static cvarTable_t cvarTable[] = {
{ &ui_tourney_fraglimit, "ui_tourney_fraglimit", "0", CVAR_ARCHIVE }, { &ui_tourney_fraglimit, "ui_tourney_fraglimit", "0", CVAR_ARCHIVE },
{ &ui_tourney_timelimit, "ui_tourney_timelimit", "15", CVAR_ARCHIVE }, { &ui_tourney_timelimit, "ui_tourney_timelimit", "15", CVAR_ARCHIVE },
*/ */
{ &ui_racing_laplimit, "ui_racing_laplimit", "6", CVAR_ARCHIVE }, { &ui_racing_laplimit, "ui_racing_laplimit", "3", CVAR_ARCHIVE },
{ &ui_racing_timelimit, "ui_racing_timelimit", "0", CVAR_ARCHIVE }, { &ui_racing_timelimit, "ui_racing_timelimit", "0", CVAR_ARCHIVE },
{ &ui_team_racing_laplimit, "ui_team_racing_laplimit", "6", CVAR_ARCHIVE }, { &ui_team_racing_laplimit, "ui_team_racing_laplimit", "3", CVAR_ARCHIVE },
{ &ui_team_racing_timelimit, "ui_team_racing_timelimit", "0", CVAR_ARCHIVE }, { &ui_team_racing_timelimit, "ui_team_racing_timelimit", "0", CVAR_ARCHIVE },
{ &ui_team_racing_friendly, "ui_team_racing_friendly", "1", CVAR_ARCHIVE }, { &ui_team_racing_friendly, "ui_team_racing_friendly", "1", CVAR_ARCHIVE },
{ &ui_derby_timelimit, "ui_derby_timelimit", "10", CVAR_ARCHIVE }, { &ui_derby_timelimit, "ui_derby_timelimit", "10", CVAR_ARCHIVE },
{ &ui_dm_fraglimit, "ui_dm_fraglimit", "0", CVAR_ARCHIVE }, { &ui_dm_fraglimit, "ui_dm_fraglimit", "15", CVAR_ARCHIVE },
{ &ui_dm_timelimit, "ui_dm_timelimit", "0", CVAR_ARCHIVE }, { &ui_dm_timelimit, "ui_dm_timelimit", "10", CVAR_ARCHIVE },
// END // END
{ &ui_team_fraglimit, "ui_team_fraglimit", "0", CVAR_ARCHIVE }, { &ui_team_fraglimit, "ui_team_fraglimit", "15", CVAR_ARCHIVE },
{ &ui_team_timelimit, "ui_team_timelimit", "20", CVAR_ARCHIVE }, { &ui_team_timelimit, "ui_team_timelimit", "10", CVAR_ARCHIVE },
{ &ui_team_friendly, "ui_team_friendly", "1", CVAR_ARCHIVE }, { &ui_team_friendly, "ui_team_friendly", "1", CVAR_ARCHIVE },
{ &ui_ctf_capturelimit, "ui_ctf_capturelimit", "8", CVAR_ARCHIVE }, { &ui_ctf_capturelimit, "ui_ctf_capturelimit", "8", CVAR_ARCHIVE },
{ &ui_ctf_timelimit, "ui_ctf_timelimit", "30", CVAR_ARCHIVE }, { &ui_ctf_timelimit, "ui_ctf_timelimit", "30", CVAR_ARCHIVE },
{ &ui_ctf_friendly, "ui_ctf_friendly", "0", CVAR_ARCHIVE }, { &ui_ctf_friendly, "ui_ctf_friendly", "1", CVAR_ARCHIVE },
// Q3Rally Code Start // Q3Rally Code Start
{ &ui_dom_capturelimit, "ui_dom_capturelimit", "0", CVAR_ARCHIVE }, { &ui_dom_capturelimit, "ui_dom_capturelimit", "300", CVAR_ARCHIVE },
{ &ui_dom_timelimit, "ui_dom_timelimit", "30", CVAR_ARCHIVE }, { &ui_dom_timelimit, "ui_dom_timelimit", "15", CVAR_ARCHIVE },
{ &ui_dom_friendly, "ui_dom_friendly", "0", CVAR_ARCHIVE }, { &ui_dom_friendly, "ui_dom_friendly", "1", CVAR_ARCHIVE },
{ &ui_sigilLocator, "cg_sigilLocator", "1", CVAR_ARCHIVE }, { &ui_sigilLocator, "cg_sigilLocator", "1", CVAR_ARCHIVE },
// Q3Rally Code END // Q3Rally Code END

View file

@ -165,8 +165,8 @@ char *UI_GetStatKey(int num){
case MS_LAPS: case MS_LAPS:
return "laps"; return "laps";
case MS_TRACKLENGTH: case MS_LAPTIME:
return "length"; return "laptime";
case MS_NUMCHECKPOINTS: case MS_NUMCHECKPOINTS:
return "checkpoints"; return "checkpoints";
@ -187,7 +187,7 @@ char *UI_GetStatKey(int num){
return "tracklengths"; return "tracklengths";
case MS_BOTSUPPORT: case MS_BOTSUPPORT:
return "bots"; return "botsupport";
case MS_NUMTEAMS: case MS_NUMTEAMS:
return "teams"; return "teams";
@ -205,8 +205,8 @@ char *UI_GetStatName(int num){
case MS_LAPS: case MS_LAPS:
return "Default number of laps:"; return "Default number of laps:";
case MS_TRACKLENGTH: case MS_LAPTIME:
return "Track length:"; return "Laptime:";
case MS_NUMCHECKPOINTS: case MS_NUMCHECKPOINTS:
return "Number of checkpoints:"; return "Number of checkpoints:";
@ -246,7 +246,7 @@ char *UI_GetDefaultStatValue( int num ){
case MS_LAPS: case MS_LAPS:
return "Unknown"; return "Unknown";
case MS_TRACKLENGTH: case MS_LAPTIME:
return "Unknown"; return "Unknown";
case MS_NUMCHECKPOINTS: case MS_NUMCHECKPOINTS:
@ -1634,10 +1634,14 @@ static void ServerOptions_InitBotNames( void ) {
char *bot; char *bot;
char bots[MAX_INFO_STRING]; char bots[MAX_INFO_STRING];
if( s_serveroptions.gametype >= GT_TEAM ) { // changed to declare bots in arena files
// if( s_serveroptions.gametype >= GT_TEAM ) {
if( s_serveroptions.gametype > GT_DOMINATION ) {
Q_strncpyz( s_serveroptions.playerNameBuffers[1], "Bobby", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[1], "Bobby", 16 );
Q_strncpyz( s_serveroptions.playerNameBuffers[2], "Carla", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[2], "Carla", 16 );
if( s_serveroptions.gametype == GT_TEAM ) { // changed to declare bots in arena files
// if( s_serveroptions.gametype == GT_TEAM ) {
if( s_serveroptions.gametype > GT_DOMINATION ) {
Q_strncpyz( s_serveroptions.playerNameBuffers[3], "Paul", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[3], "Paul", 16 );
} }
else { else {
@ -1649,7 +1653,9 @@ static void ServerOptions_InitBotNames( void ) {
Q_strncpyz( s_serveroptions.playerNameBuffers[6], "Alexandra", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[6], "Alexandra", 16 );
Q_strncpyz( s_serveroptions.playerNameBuffers[7], "Sam", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[7], "Sam", 16 );
Q_strncpyz( s_serveroptions.playerNameBuffers[8], "Dean", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[8], "Dean", 16 );
if( s_serveroptions.gametype == GT_TEAM ) { // changed to declare bots in arena files
// if( s_serveroptions.gametype == GT_TEAM ) {
if( s_serveroptions.gametype > GT_DOMINATION ) {
Q_strncpyz( s_serveroptions.playerNameBuffers[9], "Janine", 16 ); Q_strncpyz( s_serveroptions.playerNameBuffers[9], "Janine", 16 );
} }
else { else {

View file

@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack" #define BASETA "missionpack"
#ifndef PRODUCT_VERSION #ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.3c_r421" #define PRODUCT_VERSION "v0.3c_r422"
#endif #endif

View file

@ -888,15 +888,19 @@ q3rallycode
0=engine\code\qcommon\q_shared.h 0=engine\code\qcommon\q_shared.h
1=engine\code\q3_ui\ui_rally_startserver.c 1=engine\code\q3_ui\ui_rally_startserver.c
2=engine\code\q3_ui\ui_local.h 2=engine\code\q3_ui\ui_local.h
3=engine\code\q3_ui\ui_main.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\q3_ui\ui_rally_startserver.c
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=51 TopLine=51
Caret=36,70 Caret=36,70
[engine\code\q3_ui\ui_rally_startserver.c] [engine\code\q3_ui\ui_rally_startserver.c]
TopLine=353 TopLine=1634
Caret=1,291 Caret=42,1637
[engine\code\q3_ui\ui_local.h] [engine\code\q3_ui\ui_local.h]
TopLine=335 TopLine=44
Caret=17,357 Caret=1,60
[engine\code\q3_ui\ui_main.c]
TopLine=225
Caret=47,243