Remove old event handling

This commit is contained in:
Vortrex
2022-07-30 08:15:46 -05:00
parent ad5dd488b9
commit 149e3f3fa5

View File

@@ -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() { function forceLocalPlayerEquippedWeaponItem() {
if (typeof localPlayer.weapon != "undefined") { if (typeof localPlayer.weapon != "undefined") {
if (forceWeapon != 0) { 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) { function getVehicleForNetworkEvent(vehicle) {
if (getGame() == AGRP_GAME_GTA_IV) { if (getGame() == AGRP_GAME_GTA_IV) {
return natives.getNetworkIdFromVehicle(vehicle); return natives.getNetworkIdFromVehicle(vehicle);