summaryrefslogtreecommitdiffstats
path: root/source/World.h
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-10-29 17:44:51 +0100
committerSamuel Barney <samjbarney@gmail.com>2013-10-29 17:44:51 +0100
commite1a06153b2e93473af58e1d801998ff7f388dc6d (patch)
tree080e0f9744333fe7936bcda1da47757dfa9fb10f /source/World.h
parentMerge branch 'master' of https://github.com/SamJBarney/MCServer into MobSpawning (diff)
downloadcuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.gz
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.bz2
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.lz
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.xz
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.zst
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.zip
Diffstat (limited to '')
-rw-r--r--source/World.h7
1 files changed, 7 insertions, 0 deletions
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<cMonster::eFamily,Int64> 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);