Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Better Selector Rendering + Velocity Hider
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Apr 4, 2023
1 parent 1862056 commit e4e897f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/core/client/systems/entitySelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ const Internal = {
selectionIndex = 0;
}

const pos = new alt.Vector3(selections[selectionIndex].pos).add(
let existingPos: alt.IVector3 = selections[selectionIndex].pos;
if (native.doesEntityExist(selections[selectionIndex].id)) {
existingPos = native.getEntityCoords(selections[selectionIndex].id, false);
}

const pos = new alt.Vector3(existingPos).add(
0,
0,
isNaN(selections[selectionIndex].height) ? 1 : selections[selectionIndex].height,
Expand All @@ -229,6 +234,13 @@ const Internal = {
return;
}

if (selections[selectionIndex].type === 'player' || selections[selectionIndex].type === 'vehicle') {
const velocity = native.getEntitySpeed(selections[selectionIndex].id);
if (velocity >= 6) {
return;
}
}

AthenaClient.screen.marker.drawSimple(
MARKER_TYPE.CHEVRON_UP,
pos,
Expand Down

0 comments on commit e4e897f

Please sign in to comment.