Fix game warnings
This commit is contained in:
1 parent
b55809b925
commit
fbdb3e0875
2 files changed
+7
-3
No files matched your search
+3
-3
@@ -161,7 +161,7 @@ int BotSortTeamMatesByBaseTravelTime(bot_state_t *bs, int *teammates, int maxtea
|
||||
//skip spectators
|
||||
if (atoi(Info_ValueForKey(buf, "t")) == TEAM_SPECTATOR) continue;
|
||||
//
|
||||
if (BotSameTeam(bs, i)) {
|
||||
if (BotSameTeam(bs, i) && goal) {
|
||||
//
|
||||
traveltime = BotClientTravelTimeToGoal(i, goal);
|
||||
//
|
||||
@@ -337,7 +337,7 @@ BotCTFOrders
|
||||
*/
|
||||
void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
int numteammates, defenders, attackers, i, other;
|
||||
int teammates[MAX_CLIENTS];
|
||||
int teammates[MAX_CLIENTS] = {0};
|
||||
char name[MAX_NETNAME], carriername[MAX_NETNAME];
|
||||
|
||||
numteammates = BotSortTeamMatesByBaseTravelTime(bs, teammates, sizeof(teammates));
|
||||
@@ -695,7 +695,7 @@ BotCTFOrders
|
||||
*/
|
||||
void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
int numteammates, defenders, attackers, i;
|
||||
int teammates[MAX_CLIENTS];
|
||||
int teammates[MAX_CLIENTS] = {0};
|
||||
char name[MAX_NETNAME];
|
||||
|
||||
//sort team mates by travel time to base
|
||||
|
||||
Reference in new issue
Block a user