mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-16 11:44:22 +00:00
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:
@@ -8,6 +8,8 @@ public:
|
||||
|
||||
float m_npcSkillTime;
|
||||
|
||||
float m_maxRange{};
|
||||
|
||||
/*
|
||||
* Inherited
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@ void VerifyBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitS
|
||||
|
||||
const auto distance = Vector3::DistanceSquared(self->GetPosition(), entity->GetPosition());
|
||||
|
||||
if (distance > this->m_range * this->m_range) {
|
||||
if (distance > this->m_range) {
|
||||
success = false;
|
||||
}
|
||||
} else if (this->m_blockCheck) {
|
||||
@@ -57,4 +57,5 @@ void VerifyBehavior::Load() {
|
||||
this->m_action = GetAction("action");
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user