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
This commit is contained in:
Josuan Albin 2018-08-01 00:36:22 +02:00 committed by PabstMirror
parent 2767fddd92
commit 9f85a53711
3 changed files with 3 additions and 3 deletions

View File

@ -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]);

View File

@ -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;

View File

@ -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