Remove some extra IV workarounds

This commit is contained in:
Vortrex
2022-11-02 06:50:33 -05:00
parent 95abb20b5e
commit 79812375f1

View File

@@ -193,9 +193,9 @@ function getVehicleHeading(vehicle) {
// =========================================================================== // ===========================================================================
function setVehicleHeading(vehicle, heading) { function setVehicleHeading(vehicle, heading) {
if (getGame() == AGRP_GAME_GTA_IV) { //if (getGame() == AGRP_GAME_GTA_IV) {
return sendNetworkEventToPlayer("agrp.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading); // return sendNetworkEventToPlayer("agrp.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading);
} //}
return vehicle.heading = heading; return vehicle.heading = heading;
} }
@@ -227,12 +227,12 @@ function getVehicleSyncer(vehicle) {
// =========================================================================== // ===========================================================================
function getVehicleForNetworkEvent(vehicle) { function getVehicleForNetworkEvent(vehicle) {
if (getGame() == AGRP_GAME_GTA_IV) { //if (getGame() == AGRP_GAME_GTA_IV) {
if (getVehicleData(vehicle).ivNetworkId != -1) { // if (getVehicleData(vehicle).ivNetworkId != -1) {
return getVehicleData(vehicle).ivNetworkId; // return getVehicleData(vehicle).ivNetworkId;
} // }
return -1; // return -1;
} //}
return vehicle.id; return vehicle.id;
} }
@@ -1112,9 +1112,9 @@ function getClosestCivilian(position) {
// =========================================================================== // ===========================================================================
function getVehiclesInRange(position, range) { function getVehiclesInRange(position, range) {
if (getGame() == AGRP_GAME_GTA_IV) { //if (getGame() == AGRP_GAME_GTA_IV) {
return getServerData().vehicles.reduce((i, j) => (getDistance(position, i.syncPosition) <= getDistance(position, j.syncPosition)) ? i : j); // return getServerData().vehicles.reduce((i, j) => (getDistance(position, i.syncPosition) <= getDistance(position, j.syncPosition)) ? i : j);
} //}
return getElementsByTypeInRange(ELEMENT_VEHICLE, position, range); return getElementsByTypeInRange(ELEMENT_VEHICLE, position, range);
} }
@@ -1241,11 +1241,11 @@ function getPlayerPed(client) {
return null; return null;
} }
if (getGame() == AGRP_GAME_GTA_IV) { //if (getGame() == AGRP_GAME_GTA_IV) {
return getPlayerData(client).ped; // return getPlayerData(client).ped;
} else { //} else {
return client.player; return client.player;
} //}
} }
// =========================================================================== // ===========================================================================