Fix undefined variable in View Distance

This commit is contained in:
jonpas 2019-08-14 17:42:01 +02:00 committed by GitHub
parent df8814e344
commit f1b1ec0d55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,9 +29,11 @@ if (_objectViewDistanceCoeff isEqualType 0) then {
if (_objectViewDistanceCoeff > 0) then {
setObjectViewDistance (_objectViewDistanceCoeff * viewDistance);
} else {
// Restore correct view distance when changing from FoV Based to Off
// Restoring directly inside PFH's self-exit resulted in the need of selecting another option to take effect
setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
if (!isNil QGVAR(fovBasedPFHminimalViewDistance)) then {
// Restore correct view distance when changing from FoV Based to Off
// Restoring directly inside PFH's self-exit resulted in the need of selecting another option to take effect
setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
};
};
} else {
if (isNil QGVAR(fovBasedPFHminimalViewDistance)) then {