Renamed m_DoDaylightCycle to m_CycleDaylight.
This commit is contained in:
parent
4271d719b6
commit
32e1e9a553
@ -243,7 +243,7 @@ cWorld::cWorld(const AString & a_WorldName, eDimension a_Dimension, const AStrin
|
||||
#endif
|
||||
m_Dimension(a_Dimension),
|
||||
m_IsSpawnExplicitlySet(false),
|
||||
m_DoDaylightCycle(true),
|
||||
m_CycleDaylight(true),
|
||||
m_WorldAgeSecs(0),
|
||||
m_TimeOfDaySecs(0),
|
||||
m_WorldAge(0),
|
||||
@ -832,7 +832,7 @@ void cWorld::Tick(float a_Dt, int a_LastTickDurationMSec)
|
||||
m_WorldAgeSecs += (double)a_Dt / 1000.0;
|
||||
m_WorldAge = (Int64)(m_WorldAgeSecs * 20.0);
|
||||
|
||||
if (m_DoDaylightCycle)
|
||||
if (m_CycleDaylight)
|
||||
{
|
||||
// We need sub-tick precision here, that's why we store the time in seconds and calculate ticks off of it
|
||||
m_TimeOfDaySecs += (double)a_Dt / 1000.0;
|
||||
@ -2249,7 +2249,7 @@ void cWorld::BroadcastThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ, cons
|
||||
void cWorld::BroadcastTimeUpdate(const cClientHandle * a_Exclude)
|
||||
{
|
||||
int TimeOfDay = m_TimeOfDay;
|
||||
if (!m_DoDaylightCycle)
|
||||
if (!m_CycleDaylight)
|
||||
{
|
||||
TimeOfDay *= -1;
|
||||
if (TimeOfDay == 0)
|
||||
|
@ -147,12 +147,12 @@ public:
|
||||
int GetTicksUntilWeatherChange(void) const { return m_WeatherInterval; }
|
||||
|
||||
/** Is the daylight cyclus enabled? */
|
||||
virtual bool IsDaylightCycleEnabled(void) const { return m_DoDaylightCycle; }
|
||||
virtual bool IsDaylightCycleEnabled(void) const { return m_CycleDaylight; }
|
||||
|
||||
/** Sets the daylight cyclus to true/false. */
|
||||
virtual void SetDoDaylightCycle(bool a_DoDaylightCycle)
|
||||
virtual void SetDoDaylightCycle(bool a_CycleDaylight)
|
||||
{
|
||||
m_DoDaylightCycle = a_DoDaylightCycle;
|
||||
m_CycleDaylight = a_CycleDaylight;
|
||||
BroadcastTimeUpdate();
|
||||
}
|
||||
|
||||
@ -879,7 +879,7 @@ private:
|
||||
bool m_BroadcastDeathMessages;
|
||||
bool m_BroadcastAchievementMessages;
|
||||
|
||||
bool m_DoDaylightCycle; // Is the daylight cyclus enabled?
|
||||
bool m_CycleDaylight; // Is the daylight cyclus enabled?
|
||||
double m_WorldAgeSecs; // World age, in seconds. Is only incremented, cannot be set by plugins.
|
||||
double m_TimeOfDaySecs; // Time of day in seconds. Can be adjusted. Is wrapped to zero each day.
|
||||
Int64 m_WorldAge; // World age in ticks, calculated off of m_WorldAgeSecs
|
||||
|
Loading…
Reference in New Issue
Block a user