1
0

Reduced code duplication

call @maxmaxoft!
calling...
call connected (0:20)
call ended
This commit is contained in:
Tiger Wang 2014-06-11 13:40:34 +01:00
parent f7913d3b74
commit 1a9467574e

View File

@ -722,7 +722,7 @@ public:
/** 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)));
return (IsWeatherRain() && !IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ)));
}
/** Returns true if the current weather is stormy */
@ -731,16 +731,16 @@ public:
/** 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)));
return (IsWeatherStorm() && !IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ)));
}
/** Returns true if the current weather has any precipitation - rain, storm or snow */
bool IsWeatherWet(void) const { return (m_Weather != wSunny); }
bool IsWeatherWet(void) const { return !IsWeatherSunny(); }
/** 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)));
return (IsWeatherWet() && !IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ)));
}
// tolua_end