refactor(package): don't run onExit when point is removed in distance

This commit is contained in:
Luke
2023-03-02 10:51:02 +01:00
parent 8b39f630fd
commit ccce570005

View File

@@ -43,7 +43,6 @@ export class Point<T = unknown> {
const coords = Vector3.fromArray(GetEntityCoords(cache.ped, false));
const distance = coords.distance(this.coords);
if (distance < this.distance) {
this.onExit && this.onExit();
nearbyCount -= 1;
nearbyPoints = nearbyPoints.filter((point) => point.id !== this.id);
if (nearbyCount === 0 && tick) {