Aggro radius (#665)

This commit is contained in:
David Markowitz 2022-07-20 20:26:52 -07:00 committed by GitHub
parent 91f2cebcc7
commit 40a9aefb5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,9 +65,9 @@ BaseCombatAIComponent::BaseCombatAIComponent(Entity* parent, const uint32_t id)
// radii if it is greater than the one in the database. // radii if it is greater than the one in the database.
if (m_Parent) { if (m_Parent) {
auto aggroRadius = m_Parent->GetVar<float>(u"aggroRadius"); auto aggroRadius = m_Parent->GetVar<float>(u"aggroRadius");
m_AggroRadius = std::max(aggroRadius, m_AggroRadius); m_AggroRadius = aggroRadius != 0 ? aggroRadius : m_AggroRadius;
auto tetherRadius = m_Parent->GetVar<float>(u"tetherRadius"); auto tetherRadius = m_Parent->GetVar<float>(u"tetherRadius");
m_HardTetherRadius = std::max(tetherRadius, m_HardTetherRadius); m_HardTetherRadius = tetherRadius != 0 ? tetherRadius : m_HardTetherRadius;
} }
/* /*