mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-17 12:14:21 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c898356eba | ||
|
|
79bb48d3bc |
@@ -8,6 +8,8 @@ public:
|
|||||||
|
|
||||||
float m_npcSkillTime;
|
float m_npcSkillTime;
|
||||||
|
|
||||||
|
float m_maxRange{};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inherited
|
* Inherited
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user