mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Updated missing ServiePoint Changes
This commit is contained in:
parent
1759243002
commit
94c8db8408
@ -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 {
|
||||
_inSP = true;
|
||||
};
|
||||
{
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user