Revert test stuff
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user