From 49c54030310a31eedf6237c9f5501b373fc4f5a7 Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Wed, 21 Apr 2021 22:40:36 +0600 Subject: [PATCH] Update fn_sunRise.sqf --- SQF/dayz_code/compile/fn_sunRise.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/compile/fn_sunRise.sqf b/SQF/dayz_code/compile/fn_sunRise.sqf index d7b4614f8..35e119ed6 100644 --- a/SQF/dayz_code/compile/fn_sunRise.sqf +++ b/SQF/dayz_code/compile/fn_sunRise.sqf @@ -14,10 +14,10 @@ Reference: http://forums.bistudio.com/showthread.php?107476-How-do-I-detect-sundown-sunrise */ -private["_daytime"]; +private["_lat","_day","_hour","_daytime"]; _lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); _day = 360 * (dateToNumber date); _hour = acos ((24 * sin(_lat) * cos(_day)) / ((12 * cos(_day) - 78) * cos(_lat))); _daytime = _hour / 360 * 24; -_daytime \ No newline at end of file +_daytime