fix: enemies not interrupting QB's when they do damage

tested that stromlings in AG now correctly interrupt quickbuilds if the player takes damage
This commit is contained in:
David Markowitz
2026-06-15 20:03:20 -07:00
parent c0d055e66e
commit 855864c536
2 changed files with 4 additions and 1 deletions

View File

@@ -8,6 +8,8 @@ public:
float m_npcSkillTime; float m_npcSkillTime;
float m_maxRange{};
/* /*
* Inherited * Inherited
*/ */

View File

@@ -25,7 +25,7 @@ void VerifyBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitS
const auto distance = Vector3::DistanceSquared(self->GetPosition(), entity->GetPosition()); const auto distance = Vector3::DistanceSquared(self->GetPosition(), entity->GetPosition());
if (distance > this->m_range * this->m_range) { if (distance > this->m_range) {
success = false; success = false;
} }
} else if (this->m_blockCheck) { } else if (this->m_blockCheck) {
@@ -57,4 +57,5 @@ void VerifyBehavior::Load() {
this->m_action = GetAction("action"); this->m_action = GetAction("action");
this->m_range = GetFloat("range"); this->m_range = GetFloat("range");
this->m_range = this->m_range * this->m_range * 0.9f; // Range checks are slightly smaller than the actual range to account for client/server discrepancies
} }