From e1a06153b2e93473af58e1d801998ff7f388dc6d Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Tue, 29 Oct 2013 10:44:51 -0600 Subject: Update to allow the light map to remain the same, but allow alteration of sky light values based on time. --- source/World.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/World.h') diff --git a/source/World.h b/source/World.h index f174a1c2c..5976321e1 100644 --- a/source/World.h +++ b/source/World.h @@ -592,6 +592,9 @@ public: /// Appends all usernames starting with a_Text (case-insensitive) into Results void TabCompleteUserName(const AString & a_Text, AStringVector & a_Results); + /// Get the current darkness level based on the time + Int64 GetSkyDarkness() { return m_SkyDarkness; } + private: friend class cRoot; @@ -636,6 +639,8 @@ private: Int64 m_LastSave; // The last WorldAge (in ticks) in which save-all was triggerred std::map m_LastSpawnMonster; // The last WorldAge (in ticks) in which a monster was spawned (for each megatype of monster) // MG TODO : find a way to optimize without creating unmaintenability (if mob IDs are becoming unrowed) + Int64 m_SkyDarkness; + eGameMode m_GameMode; bool m_bEnabledPVP; bool m_IsDeepSnowEnabled; @@ -727,6 +732,8 @@ private: /// Ticks all clients that are in this world void TickClients(float a_Dt); + + void UpdateSkyDarkness(); /// Creates a new fluid simulator, loads its settings from the inifile (a_FluidName section) cFluidSimulator * InitializeFluidSimulator(cIniFile & a_IniFile, const char * a_FluidName, BLOCKTYPE a_SimulateBlock, BLOCKTYPE a_StationaryBlock); -- cgit v1.2.3