Do not steal medpacks if being healed (#1418)

This commit is contained in:
Ashley 2021-04-07 14:59:47 -04:00 committed by GitHub
parent c96e22eac1
commit d7751fee95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,10 @@ static Timer ammo_cooldown{};
// Should we search health at all? // Should we search health at all?
bool shouldSearchHealth(bool low_priority = false) bool shouldSearchHealth(bool low_priority = false)
{ {
// Check if being gradually healed in any way
if (HasCondition<TFCond_Healing>(LOCAL_E))
return false;
// Priority too high // Priority too high
if (navparser::NavEngine::current_priority > health) if (navparser::NavEngine::current_priority > health)
return false; return false;