From 2d4cd0ec99f13259996a75a1d827abcfda86b2e8 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Thu, 2 Nov 2023 21:03:32 +0100 Subject: [PATCH] Find rope start position more efficiently By fully using the passed parameters instead of fetching it from config again --- .../fnc_infantryPhoneChildrenActions.sqf | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/addons/sys_intercom/fnc_infantryPhoneChildrenActions.sqf b/addons/sys_intercom/fnc_infantryPhoneChildrenActions.sqf index f8fb508ce..5b4950902 100644 --- a/addons/sys_intercom/fnc_infantryPhoneChildrenActions.sqf +++ b/addons/sys_intercom/fnc_infantryPhoneChildrenActions.sqf @@ -15,7 +15,7 @@ * Public: No */ -params ["_target"]; +params ["_target", "_unit", "_position"]; private _actions = []; @@ -47,17 +47,6 @@ if (_target isKindOf "CAManBase") then { } else { if (vehicle acre_player != _target) then { // Pointing at a vehicle. Get or return the infantry telephone - - // Get Infantry phone position (copied fnc_infantryPhoneAction.sqf, probably a better way to pass position info) - private _positionConfig = configFile >> "CfgVehicles" >> (typeOf _target) >> "acre_infantryPhonePosition"; - private _position = [0, 0, 0]; // Default to main action point - if (isText _positionConfig) then { - _position = _target selectionPosition (getText _positionConfig); // Convert to coordinates for sys_core intercomPFH checks - }; - if (isArray _positionConfig) then { - _position = getArray _positionConfig; - }; - if (isNull _vehicleInfantryPhone) then { { private _action = [