diff options
author | Alexander Harkness <bearbin@gmail.com> | 2014-06-11 11:33:16 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2014-06-11 11:33:16 +0200 |
commit | c3c3782c67265f2844dc66667d3e6bc79a6b25ff (patch) | |
tree | d994c95d9b74e31c2645600ffb5401db7e03358a /src/World.h | |
parent | Removed assert that is now informed by type system (diff) | |
download | cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.tar cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.tar.gz cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.tar.bz2 cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.tar.lz cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.tar.xz cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.tar.zst cuberite-c3c3782c67265f2844dc66667d3e6bc79a6b25ff.zip |
Diffstat (limited to 'src/World.h')
-rw-r--r-- | src/World.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/World.h b/src/World.h index abdc3120c..b0fed84ba 100644 --- a/src/World.h +++ b/src/World.h @@ -708,12 +708,23 @@ public: eWeather GetWeather (void) const { return m_Weather; }; bool IsWeatherSunny(void) const { return (m_Weather == wSunny); } + bool IsWeatherSunny(int a_BlockX, int a_BlockZ) const { + return (m_Weather == wSunny) + } bool IsWeatherRain (void) const { return (m_Weather == wRain); } + bool IsWeatherRain (int a_BlockX, int a_BlockZ) const { + return (m_Weather == wRain) && (!IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ))) + } bool IsWeatherStorm(void) const { return (m_Weather == wStorm); } + bool IsWeatherStorm(int a_BlockX, int a_BlockZ) const { + return (m_Weather == wStorm) && (!IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ))) + } /** Returns true if the current weather has any precipitation - rain or storm */ bool IsWeatherWet (void) const { return (m_Weather != wSunny); } - + bool IsWeatherWet (int a_BlockX, int a_BlockZ) const { + return (m_Weather != wSunny) && (!IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ))) + } // tolua_end cChunkGenerator & GetGenerator(void) { return m_Generator; } |