Revert test stuff

This commit is contained in:
Vortrex
2022-05-12 16:54:15 -05:00
parent 27553fa74f
commit e5a75355ad

View File

@@ -420,6 +420,28 @@ function processLocalPlayerVehicleControlState() {
// =========================================================================== // ===========================================================================
function processLocalPlayerSphereEntryExitHandling() {
let position = getLocalPlayerPosition();
if(areMarkersSupported()) {
getElementsByType(ELEMENT_MARKER).forEach(function(sphere) {
if(getDistance(position, sphere.position) <= sphere.radius) {
if(!inSphere) {
inSphere = sphere;
triggerEvent("OnLocalPlayerEnterSphere", null, sphere);
}
} else {
if(inSphere) {
inSphere = false;
triggerEvent("OnLocalPlayerExitSphere", null, sphere);
}
}
});
}
}
// ===========================================================================
function processJobRouteSphere() { function processJobRouteSphere() {
if(getGame() == VRR_GAME_GTA_SA) { if(getGame() == VRR_GAME_GTA_SA) {
let position = getLocalPlayerPosition(); let position = getLocalPlayerPosition();
@@ -469,6 +491,24 @@ function getLocalPlayerPosition() {
// =========================================================================== // ===========================================================================
function processLocalPlayerVehicleEntryExitHandling() {
if(localPlayer.vehicle) {
if(!inVehicle) {
inVehicle = localPlayer.vehicle;
inVehicleSeat = getLocalPlayerVehicleSeat();
triggerEvent("OnLocalPlayerEnteredVehicle", inVehicle, inVehicleSeat);
}
} else {
if(inVehicle) {
triggerEvent("OnLocalPlayerExitedVehicle", inVehicle, inVehicleSeat);
inVehicle = false;
inVehicleSeat = false;
}
}
}
// ===========================================================================
function getVehicleForNetworkEvent(vehicle) { function getVehicleForNetworkEvent(vehicle) {
if(getGame() == VRR_GAME_GTA_IV) { if(getGame() == VRR_GAME_GTA_IV) {
return natives.getNetworkIdFromVehicle(vehicle); return natives.getNetworkIdFromVehicle(vehicle);