ACE3/addons/common/functions/fnc_ambientBrightness.sqf

19 lines
427 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
/*
* Author: commy2, idea by Falke
* Returns a brightness value depending on the sun and moon state. Ranges from 0 to 1 (dark ... bright).
*
2015-09-18 07:38:19 +00:00
* Arguments:
* None
*
2015-09-18 07:38:19 +00:00
* Return Value:
* Ambient brightness <NUMBER>
*
* Example:
* [] call ace_common_fnc_ambientBrightness
*
2015-09-18 07:38:19 +00:00
* Public: Yes
*/
2015-09-18 07:38:19 +00:00
(sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity / 5) * (1 - overcast)) min 1