Skip to content

Commit

Permalink
Goggles - Skip rain effects on snow maps (#7373)
Browse files Browse the repository at this point in the history
* Goggles - Skip rain effects on snow maps

* Update XEH_postInit.sqf
  • Loading branch information
PabstMirror authored Jan 3, 2020
1 parent 1aec991 commit 97d8be9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/goggles/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,16 @@ if (!hasInterface) exitWith {};

}] call CBA_fnc_addEventHandler;

// Handle "rain is snow" maps like CUP's Chernarus Winter
private _rainSpeed = getNumber (configFile >> "CfgWorlds" >> worldName >> "RainParticles" >> "dropSpeed");
GVAR(mapHasRain) = _rainSpeed > 10; // CAWorld default is 25, Chernarus_Winter is 1

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

// rain
call FUNC(applyRainEffect);
if (GVAR(mapHasRain)) then FUNC(applyRainEffect);

// auto remove effects under water
if (GVAR(EffectsActive) && {underwater ACE_player} && {[goggles ACE_player] call FUNC(isDivingGoggles)}) then {
Expand Down

0 comments on commit 97d8be9

Please sign in to comment.