Day night cycle
Jump to navigation
Jump to search
Summary
WIP
CGameTime
CGameTime contains the logic and values necessary to determine things like: time of day progression, adjustments necessary to transform local time in to server time, etc.
CGameTime::GameTimeGetDayProgression
The GameTimeGetDayProgression function in CGameTime is frequently used in the various DayNight calculations. This function calculates the minutes since midnight in server time, and divides by the total number of minutes in a day.
The return value is a floating point that ranges from 0.0 to 1.0, measuring the distance the current server time is from midnight.