From 149e3f3fa57d2ed565d0e10a3a0dd6f99589be25 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 30 Jul 2022 08:15:46 -0500 Subject: [PATCH] Remove old event handling --- scripts/client/utilities.js | 53 ------------------------------------- 1 file changed, 53 deletions(-) diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js index 6907cca7..adf038f7 100644 --- a/scripts/client/utilities.js +++ b/scripts/client/utilities.js @@ -430,41 +430,6 @@ 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() { - if (getGame() == AGRP_GAME_GTA_SA) { - let position = getLocalPlayerPosition(); - if (jobRouteLocationSphere != null) { - if (getDistance(position, jobRouteLocationSphere.position) <= 2.0) { - enteredJobRouteSphere(); - } - } - } -} - -// =========================================================================== - function forceLocalPlayerEquippedWeaponItem() { if (typeof localPlayer.weapon != "undefined") { if (forceWeapon != 0) { @@ -501,24 +466,6 @@ 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) { if (getGame() == AGRP_GAME_GTA_IV) { return natives.getNetworkIdFromVehicle(vehicle);