Merge pull request #770 from Ignatz-HeMan/patch-3

Updated missing ServiePoint Changes
This commit is contained in:
vbawol 2017-06-26 06:47:01 -05:00 committed by GitHub
commit f682003a6e
2 changed files with 20 additions and 10 deletions

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 {
_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];

View File

@ -64,11 +64,7 @@ _fnc_actionTitle = {
{
if ((typeof _vehicle) == _x select 0) exitwith {
{
_ammotype = _x select 0;
_turret = _x select 1;
_maxmags = _x select 2;
_costs = _x select 3;
_ammocount = getNumber (configfile >> "CfgMagazines" >> (_x select 0) >> "count");
_x params ["_ammotype","_turret","_maxmags","_costs",["_ammocount",getNumber (configfile >> "CfgMagazines" >> (_x select 0) >> "count")]];
_maxammototal = _maxmags*_ammocount;
_totalammocount = 0;
{
@ -98,11 +94,11 @@ _fnc_actionTitle = {
_costs = [_vehicle, _refuel_costs] call _fnc_getCosts;
_actionTitle = [format['Refuel %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Refuel = [_actionTitle,[_vehicle,[_costs, _refuel_updateInterval,_refuel_amount]] ];
Ignatz_Refuel = [_actionTitle,[_vehicle,[_costs, _refuel_updateInterval,_refuel_amount]]];
_costs = [_vehicle, _repair_costs] call _fnc_getCosts;
_actionTitle = [format['Repair %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]] ];
Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]]];
if (count _Ignatz_SP_Array > 0) then {Ignatz_Rearm0 = _Ignatz_SP_Array select 0;};
if (count _Ignatz_SP_Array > 1) then {Ignatz_Rearm1 = _Ignatz_SP_Array select 1;};
if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;};