Updated missing ServiePoint Changes

This commit is contained in:
He-Man 2017-06-25 03:19:29 +02:00 committed by GitHub
parent 1759243002
commit 94c8db8408

View File

@ -32,9 +32,23 @@ _ServicePointClasses = ["CfgServicePoint", "ServicePointClasses", []] call EPO
if (_servicepoints isequalto [] && _ServicePointClasses isequalto []) exitwith {false};
_inSP = false;
if (({player distance _x < _servicepointDist} count _servicepoints > 0)) then {
{
if (count _x > 3) then {
_x params ["_pos","_dist","_vehtypes"];
{
if (_vehicle iskindof _x && _vehicle distance _pos < _dist) exitwith {
_inSP = true;
};
};
} foreach _vehtypes;
}
else {
if (_vehicle distance _x < _servicepointDist) then {
_inSP = true;
};
};
if (_inSP) exitwith {};
} foreach _servicepoints;
if (!_inSP) then {
if !(_ServicePointClasses isequalto []) then {
_nearClasses = nearestobjects [_vehicle,_ServicePointClasses,_servicepointDist];
@ -43,4 +57,19 @@ if (!_inSP) then {
};
};
};
if (!_inSP) then {
_servicepointsAir = getArray (_config >> worldname >> 'ServicePointsAir');
if (_vehicle iskindof "AIR" || _vehicle iskindof "SHIP") then {
if (({player distance _x < _servicepointDist} count _servicepointsAir > 0)) then {
_inSP = true;
};
};
if (_inSP) exitwith {};
_servicepointsLand = getArray (_config >> worldname >> 'ServicePointsLand');
if (_vehicle iskindof "Landvehicle" || _vehicle iskindof "SHIP") then {
if (({player distance _x < _servicepointDist} count _servicepointsLand > 0)) then {
_inSP = true;
};
};
};
_inSP