From b6b85c1f78aa8e937208a159dd87b6ea366cb961 Mon Sep 17 00:00:00 2001 From: RGreenlees Date: Tue, 12 Sep 2023 10:35:04 +0100 Subject: [PATCH] Minor marine fixes * Fixed crash when requesting HMG/GL when there was no advanced armoury present * Fixed marines trying to build structures which were not finished building, but are now recycling --- evobot/src/bot_commander.cpp | 2 +- evobot/src/bot_tactical.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/evobot/src/bot_commander.cpp b/evobot/src/bot_commander.cpp index 012e9ab..42081c8 100644 --- a/evobot/src/bot_commander.cpp +++ b/evobot/src/bot_commander.cpp @@ -450,7 +450,7 @@ void CommanderReceiveWeaponRequest(bot_t* pBot, edict_t* Requestor, NSStructureT sprintf(buf, "Get near an armoury, %s", STRING(Requestor->v.netname)); } - + return; } pBot->SupportAction.ActionType = ACTION_DEPLOY; diff --git a/evobot/src/bot_tactical.cpp b/evobot/src/bot_tactical.cpp index 23d18e3..dec70ae 100644 --- a/evobot/src/bot_tactical.cpp +++ b/evobot/src/bot_tactical.cpp @@ -3370,6 +3370,7 @@ edict_t* UTIL_FindClosestMarineStructureUnbuiltWithoutBuilders(bot_t* pBot, cons { if (!it.second.bOnNavmesh) { continue; } if (it.second.bFullyConstructed) { continue; } + if (UTIL_StructureIsRecycling(it.second.edict)) { continue; } bool bReachable = (IsPlayerOnMarineTeam(pBot->pEdict)) ? it.second.bIsReachableMarine : it.second.bIsReachableAlien; if (!bReachable) { continue; }