mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-10 08:23:56 +00:00
refactor(package): use cache.ped for points
This commit is contained in:
1 parent
7520509da3
commit
76eef708a8
1 file changed
+2
-1
@@ -1,4 +1,5 @@
|
||||
import { Vector3 } from '@nativewrappers/client';
|
||||
import { cache } from '../cache';
|
||||
|
||||
let points: Point[] = [];
|
||||
let nearbyPoints: Point[] = [];
|
||||
@@ -49,7 +50,7 @@ setInterval(() => {
|
||||
nearbyCount = 0;
|
||||
}
|
||||
|
||||
const coords = Vector3.fromArray(GetEntityCoords(PlayerPedId(), false));
|
||||
const coords = Vector3.fromArray(GetEntityCoords(cache.ped, false));
|
||||
|
||||
if (closestPoint && coords.distance(closestPoint.coords) > closestPoint.distance) {
|
||||
closestPoint = undefined;
|
||||
|
||||
Reference in new issue
Block a user