mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
refactor(package): don't run onExit when point is removed in distance
This commit is contained in:
@@ -43,7 +43,6 @@ export class Point<T = unknown> {
|
|||||||
const coords = Vector3.fromArray(GetEntityCoords(cache.ped, false));
|
const coords = Vector3.fromArray(GetEntityCoords(cache.ped, false));
|
||||||
const distance = coords.distance(this.coords);
|
const distance = coords.distance(this.coords);
|
||||||
if (distance < this.distance) {
|
if (distance < this.distance) {
|
||||||
this.onExit && this.onExit();
|
|
||||||
nearbyCount -= 1;
|
nearbyCount -= 1;
|
||||||
nearbyPoints = nearbyPoints.filter((point) => point.id !== this.id);
|
nearbyPoints = nearbyPoints.filter((point) => point.id !== this.id);
|
||||||
if (nearbyCount === 0 && tick) {
|
if (nearbyCount === 0 && tick) {
|
||||||
|
|||||||
Reference in New Issue
Block a user