ACE3/addons/common/functions/fnc_ambientBrightness.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

19 lines
427 B
Plaintext

#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).
*
* Arguments:
* None
*
* Return Value:
* Ambient brightness <NUMBER>
*
* Example:
* [] call ace_common_fnc_ambientBrightness
*
* Public: Yes
*/
(sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity / 5) * (1 - overcast)) min 1