diff --git a/code/game/ai_team.c b/code/game/ai_team.c index b2888bcf..2e67954a 100644 --- a/code/game/ai_team.c +++ b/code/game/ai_team.c @@ -2137,7 +2137,7 @@ void BotDDorders_PointATaken(bot_state_t *bs) { char name[MAX_NETNAME]; int pointADefenders=0; int pointBTakers=0; - int roamers=0; + // int roamers=0; if (bot_nochat.integer>2) return; @@ -2176,7 +2176,7 @@ void BotDDorders_PointATaken(bot_state_t *bs) { BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_HOLDPOINTB); } case 3: { - // Two will pick a point and take it, the other will roam.. + // Two will pick a point and take it, the other will roam. ClientName(teammates[0], name, sizeof(name)); BotAI_BotInitialChat(bs, "cmd_holdpointa", name, NULL); BotSayTeamOrder(bs, teammates[0]); @@ -2296,7 +2296,7 @@ void BotDDorders_PointBTaken(bot_state_t *bs) { char name[MAX_NETNAME]; int pointATakers=0; int pointBDefenders=0; - int roamers=0; + // int roamers=0; if (bot_nochat.integer>2) return; diff --git a/code/game/ai_vcmd.c b/code/game/ai_vcmd.c index 5a78e009..a40ab240 100644 --- a/code/game/ai_vcmd.c +++ b/code/game/ai_vcmd.c @@ -223,18 +223,21 @@ void BotVoiceChat_Offense(bot_state_t *bs, int client, int mode) { } else if (gametype == GT_DOUBLE_D) { if ((BotTeam(bs) == TEAM_RED && level.pointStatusA == TEAM_RED) || - (BotTeam(bs) == TEAM_BLUE && level.pointStatusA == TEAM_BLUE)) + (BotTeam(bs) == TEAM_BLUE && level.pointStatusA == TEAM_BLUE)) { BotVoiceChat_HoldPointA(bs,client,mode); + } else if ((BotTeam(bs) == TEAM_RED && level.pointStatusB == TEAM_RED) || - (BotTeam(bs) == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) + (BotTeam(bs) == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) { BotVoiceChat_HoldPointB(bs,client,mode); + } else if ((BotTeam(bs) == TEAM_RED && level.pointStatusA == TEAM_RED && level.pointStatusB == TEAM_RED) || (BotTeam(bs) == TEAM_BLUE && - level.pointStatusA == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) + level.pointStatusA == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) { if (rand() % 10 > 5) BotVoiceChat_HoldPointA(bs,client,mode); else BotVoiceChat_HoldPointB(bs,client,mode); + } return; } else if (gametype == GT_DOMINATION) { @@ -291,20 +294,23 @@ void BotVoiceChat_Defend(bot_state_t *bs, int client, int mode) { else if (gametype == GT_DOUBLE_D) { // If the point A is under control, defend it. if ((BotTeam(bs) == TEAM_RED && level.pointStatusA == TEAM_RED) || - (BotTeam(bs) == TEAM_BLUE && level.pointStatusA == TEAM_BLUE)) + (BotTeam(bs) == TEAM_BLUE && level.pointStatusA == TEAM_BLUE)) { BotVoiceChat_HoldPointA(bs,client,mode); + } // If the point B is under control, defend it. else if ((BotTeam(bs) == TEAM_RED && level.pointStatusB == TEAM_RED) || - (BotTeam(bs) == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) + (BotTeam(bs) == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) { BotVoiceChat_HoldPointB(bs,client,mode); + } // If both points are under control, pick one and defend it. else if ((BotTeam(bs) == TEAM_RED && level.pointStatusA == TEAM_RED && level.pointStatusB == TEAM_RED) || (BotTeam(bs) == TEAM_BLUE && - level.pointStatusA == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) + level.pointStatusA == TEAM_BLUE && level.pointStatusB == TEAM_BLUE)) { if (rand() % 10 > 5) BotVoiceChat_HoldPointA(bs,client,mode); else BotVoiceChat_HoldPointB(bs,client,mode); + } return; } else if (gametype == GT_DOMINATION) { diff --git a/code/ui/ui_local.h b/code/ui/ui_local.h index 477b986d..9e8e7f59 100644 --- a/code/ui/ui_local.h +++ b/code/ui/ui_local.h @@ -1321,6 +1321,6 @@ qboolean UI_IsATeamGametype(int check); /* Whether the gametype is team-based or qboolean UI_UsesTeamFlags(int check); /* Whether the gametype uses the red and blue flags. */ qboolean UI_UsesTheWhiteFlag(int check); /* Whether the gametype uses the neutral flag. */ qboolean UI_IsARoundBasedGametype(int check); /* Whether the gametype uses the neutral flag. */ -int UI_GetGametype(); /* Returns the current gametype */ +int UI_GetGametype(void); /* Returns the current gametype */ int UI_GetTimeToBeat(int game); /* Returns the time to beat for the current game */ /* /Neon_Knight */ diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index d276787b..3fce32f0 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -1427,18 +1427,12 @@ static void UI_DrawClanName(rectDef_t *rect, float scale, vec4_t color, int text Text_Paint(rect->x, rect->y, scale, color, UI_Cvar_VariableString("ui_teamName"), 0, 0, textStyle); } - static void UI_SetCapFragLimits(qboolean uiVars) { char *capLimit; char *fragLimit; char *timeLimit; switch (uiInfo.gameTypes[ui_gameType.integer].gtEnum) { - case GT_FFA: - fragLimit = GT_FFA_DEFAULT_SCORELIMIT; - capLimit = "0"; - timeLimit = GT_FFA_DEFAULT_TIMELIMIT; - break; case GT_TOURNAMENT: fragLimit = GT_TOURNEY_DEFAULT_SCORELIMIT; capLimit = "0"; @@ -1499,6 +1493,11 @@ static void UI_SetCapFragLimits(qboolean uiVars) capLimit = "0"; timeLimit = GT_POSSESSION_DEFAULT_TIMELIMIT; break; + default: + fragLimit = GT_FFA_DEFAULT_SCORELIMIT; + capLimit = "0"; + timeLimit = GT_FFA_DEFAULT_TIMELIMIT; + break; } if (uiVars == qtrue) { trap_Cvar_Set("ui_captureLimit", capLimit); @@ -3254,7 +3253,7 @@ static qboolean UI_GameType_HandleKey(int flags, float *special, int key) { int select = UI_SelectForKey(key); if (select != 0) { - int oldCount = UI_MapCountByGameTypeSP(); + //int oldCount = UI_MapCountByGameTypeSP(); // hard coded mess here // Changed RD @@ -3992,7 +3991,7 @@ static void UI_NextMapSkirmish(char *name) } -static void UI_StartSkirmish() +static void UI_StartSkirmish(void) { int i, k, g, delay, temp; float skill; @@ -7875,7 +7874,7 @@ UI_GetGametype Returns the current gametype. =================== */ -int UI_GetGametype() { +int UI_GetGametype(void) { return uiInfo.gameTypes[ui_gameType.integer].gtEnum; } /* diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index 4556433d..5675f39c 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -7058,7 +7058,7 @@ setMenuCount(count int) ============================ With these two functions we avoid referring to the menu count directly. */ -int getMenuCount() { +int getMenuCount(void) { return menuCount; } void setMenuCount(int count) { diff --git a/code/ui/ui_shared.h b/code/ui/ui_shared.h index 06c7a1d7..524bc742 100644 --- a/code/ui/ui_shared.h +++ b/code/ui/ui_shared.h @@ -540,7 +540,7 @@ void *UI_Alloc(int size); void UI_InitMemory(void); qboolean UI_OutOfMemory(void); -int getMenuCount(); +int getMenuCount(void); void setMenuCount(int count); #ifndef BASEOA