Update AvHAIWeaponHelper.cpp

This commit is contained in:
RGreenlees 2024-04-05 21:36:46 +01:00 committed by pierow
parent dfcd4463ac
commit e322e52619

View file

@ -549,6 +549,11 @@ AvHAIWeapon BotMarineChooseBestWeapon(AvHAIPlayer* pBot, edict_t* target)
if (FNullEnt(target))
{
if (IsPlayerReloading(pBot->Player))
{
return GetPlayerCurrentWeapon(pBot->Player);
}
if (UTIL_GetPlayerPrimaryWeaponClipAmmo(pBot->Player) > 0 || UTIL_GetPlayerPrimaryAmmoReserve(pBot->Player) > 0)
{
return UTIL_GetPlayerPrimaryWeapon(pBot->Player);