ACE3/addons/common/functions/fnc_ambientBrightness.sqf

19 lines
424 B
Plaintext
Raw Normal View History

/*
* 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-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-09-18 07:38:19 +00:00
(sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity / 5) * (1 - overcast)) min 1