From f7913d3b742e13595e3ded99820a13ade8a3b674 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 11 Jun 2014 13:37:04 +0100 Subject: [PATCH] IsWeatherSunnyAt does something useful :D --- src/World.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/World.h b/src/World.h index a72904f6a..f9471e881 100644 --- a/src/World.h +++ b/src/World.h @@ -710,20 +710,16 @@ public: /** Returns true if the current weather is sun */ bool IsWeatherSunny(void) const { return (m_Weather == wSunny); } - /** Returns true if it is sunny at the specified location. This takes into accunt biomes. - This function is identical to IsWeatherSunny except for two extra parameters that aren't used, but bearbin insists :/ - */ + /** Returns true if it is sunny at the specified location. This takes into account biomes. */ bool IsWeatherSunnyAt(int a_BlockX, int a_BlockZ) const { - UNUSED(a_BlockX); - UNUSED(a_BlockZ); - return (m_Weather == wSunny); + return (IsWeatherSunny() || IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ))); } /** Returns true if the current weather is rain */ bool IsWeatherRain(void) const { return (m_Weather == wRain); } - /** Returns true if it is raining at the specified location. This takes into accunt biomes. */ + /** Returns true if it is raining at the specified location. This takes into account biomes. */ bool IsWeatherRainAt (int a_BlockX, int a_BlockZ) const { return (m_Weather == wRain) && (!IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ))); @@ -732,7 +728,7 @@ public: /** Returns true if the current weather is stormy */ bool IsWeatherStorm(void) const { return (m_Weather == wStorm); } - /** Returns true if the weather is stormy at the specified location. This takes into accunt biomes. */ + /** Returns true if the weather is stormy at the specified location. This takes into account biomes. */ bool IsWeatherStormAt(int a_BlockX, int a_BlockZ) const { return (m_Weather == wStorm) && (!IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ))); @@ -741,7 +737,7 @@ public: /** Returns true if the current weather has any precipitation - rain, storm or snow */ bool IsWeatherWet(void) const { return (m_Weather != wSunny); } - /** Returns true if it is raining, stormy or snowing at the specified location. This takes into accunt biomes. */ + /** Returns true if it is raining, stormy or snowing at the specified location. This takes into account biomes. */ bool IsWeatherWetAt(int a_BlockX, int a_BlockZ) const { return (m_Weather != wSunny) && (!IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ)));