From 9f85a5371154aa824cb5a3711aa800163d45199f Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Wed, 1 Aug 2018 00:36:22 +0200 Subject: [PATCH] Fix error in setupExplosive with CBA 3.8.0 (#6476) * Fix error in setupExplosive with CBA 3.8.0 getFov has a param check now, this function was passing args to it and causing an error. * Fix getFov call in attach and viewDistance modules --- addons/attach/functions/fnc_attach.sqf | 2 +- addons/explosives/functions/fnc_setupExplosive.sqf | 2 +- addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index e7a8630ac9..743b344c63 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -106,7 +106,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment if (_screenPos isEqualTo []) exitWith { ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false; }; - private _realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1); + private _realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / (([] call CBA_fnc_getFov) select 1); _screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)]; ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos; private _dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 6e356a6f8d..b69f7eb40b 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -196,7 +196,7 @@ GVAR(TweakedAngle) = 0; //Show the model on the hud in aprox the same size/location as it will be placed: ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow true; - private _realDistance = ((_virtualPosASL call EFUNC(common,ASLToPosition)) distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1); + private _realDistance = ((_virtualPosASL call EFUNC(common,ASLToPosition)) distance (positionCameraToWorld [0,0,0])) / (([] call CBA_fnc_getFov) select 1); _screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)]; ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos; diff --git a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf index 4a57747d97..b4338b0511 100644 --- a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf +++ b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf @@ -25,7 +25,7 @@ if (GVAR(objectViewDistanceCoeff) < 6) exitWith { GVAR(fovBasedPFHminimalViewDistance) = nil; }; -private _zoom = (call CBA_fnc_getFov) select 1; +private _zoom = ([] call CBA_fnc_getFov) select 1; if (_zoom > VD_ZOOM_NORMAL) then { // Dynamically set Object View Distance based on player's Zoom Level and View Distance