Skip to content

Commit

Permalink
Merge pull request #3078 from acemod/fixGoggles3rd
Browse files Browse the repository at this point in the history
Fix Third Person Goggle Effect Not Displaying
  • Loading branch information
PabstMirror committed Dec 31, 2015
2 parents aa1c48e + dc60860 commit 7b077c5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
10 changes: 7 additions & 3 deletions addons/goggles/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,20 @@ private _fnc_checkGoggles = {

// goggles effects main PFH
[{
BEGIN_COUNTER(goggles);

// rain
call FUNC(applyRainEffect);

// auto remove effects under water
if (GVAR(EffectsActive) && {[goggles ACE_player] call FUNC(isDivingGoggles) && {underwater ACE_player}}) then {
if (GVAR(EffectsActive) && {underwater ACE_player} && {[goggles ACE_player] call FUNC(isDivingGoggles)}) then {
call FUNC(removeRainEffect);
call FUNC(removeDirtEffect);
call FUNC(removeDustEffect);
};

// rotor wash effect
call FUNC(applyRotorWashEffect)
}, 0.5, _fnc_checkGoggles] call CBA_fnc_addPerFrameHandler;
call FUNC(applyRotorWashEffect);

END_COUNTER(goggles);
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
1 change: 0 additions & 1 deletion addons/goggles/functions/fnc_applyDirtEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
#include "script_component.hpp"

if (GVAR(showInThirdPerson)) exitWith {false};
if (call FUNC(externalCamera)) exitWith {false};

private ["_unit", "_effects"];
Expand Down
1 change: 0 additions & 1 deletion addons/goggles/functions/fnc_applyDustEffect.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
#include "script_component.hpp"

if (GVAR(showInThirdPerson)) exitWith {};
if (call FUNC(ExternalCamera)) exitWith {};

private ["_unit", "_amount"];
Expand Down
6 changes: 5 additions & 1 deletion addons/goggles/functions/fnc_externalCamera.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
*/
#include "script_component.hpp"

cameraView in ["EXTERNAL", "GROUP"] || EFUNC(common,isFeatureCameraActive) // return
if (GVAR(showInThirdPerson)) then {
cameraView in ["GROUP"] || EFUNC(common,isFeatureCameraActive)
} else {
cameraView in ["EXTERNAL", "GROUP"] || EFUNC(common,isFeatureCameraActive)
};
1 change: 0 additions & 1 deletion addons/goggles/functions/fnc_handleExplosion.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ _effects set [BROKEN, true];
SETGLASSES(_unit,_effects);

if (getText (_config >> "ACE_OverlayCracked") != "") then {
if (GVAR(showInThirdPerson)) exitWith {};
if (call FUNC(ExternalCamera)) exitWith {};

if (isNull (GLASSDISPLAY)) then {
Expand Down

0 comments on commit 7b077c5

Please sign in to comment.