Skip to content

Commit

Permalink
Merge pull request #20 from EterniumDev/ImproveBotCommanderSupport
Browse files Browse the repository at this point in the history
Improve bot commander support for ammo and healthpacks
  • Loading branch information
RGreenlees authored Sep 11, 2023
2 parents 299ecb0 + 734381d commit 879d507
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions evobot/src/bot_commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void CommanderReceiveHealthRequest(bot_t* pBot, edict_t* Requestor)
return;
}

if (UTIL_GetItemCountOfTypeInArea(DEPLOYABLE_ITEM_MARINE_HEALTHPACK, Requestor->v.origin, UTIL_MetresToGoldSrcUnits(10.0f)) > 0)
if (UTIL_GetItemCountOfTypeInArea(DEPLOYABLE_ITEM_MARINE_HEALTHPACK, Requestor->v.origin, UTIL_MetresToGoldSrcUnits(6.0f)) > 2)
{
char buf[512];
sprintf(buf, "I've already dropped health there, %s", STRING(Requestor->v.netname));
Expand Down Expand Up @@ -534,7 +534,7 @@ void CommanderReceiveAmmoRequest(bot_t* pBot, edict_t* Requestor)
return;
}

if (UTIL_GetItemCountOfTypeInArea(DEPLOYABLE_ITEM_MARINE_AMMO, Requestor->v.origin, UTIL_MetresToGoldSrcUnits(10.0f)) > 0)
if (UTIL_GetItemCountOfTypeInArea(DEPLOYABLE_ITEM_MARINE_AMMO, Requestor->v.origin, UTIL_MetresToGoldSrcUnits(3.0f)) > 3)
{
char buf[512];
sprintf(buf, "I've already dropped ammo there, %s", STRING(Requestor->v.netname));
Expand Down Expand Up @@ -3221,12 +3221,12 @@ void COMM_SetNextSupportAction(bot_t* CommanderBot, commander_action* Action)
return;
}

// Don't drop stuff if we're critically low on resources
if (CommanderBot->resources < 20)
{
UTIL_ClearCommanderAction(Action);
return;
}
// // Don't drop stuff if we're critically low on resources - this perpetuates not having any resources, also ideally you are always low on resources
//if (CommanderBot->resources < 20)
//{
// UTIL_ClearCommanderAction(Action);
// return;
//}

int NumMarines = GAME_GetNumPlayersOnTeam(MARINE_TEAM) - 1;

Expand Down

0 comments on commit 879d507

Please sign in to comment.