summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-01 20:34:19 +0100
committerandrew <xdotftw@gmail.com>2014-03-01 20:34:19 +0100
commitd73cdba1f66a92f011ac881b581595c0959139ef (patch)
treea5c62bbc0cf7c52727e96e348a5978698c6c7a5d /src/Chunk.cpp
parentRefactored global block property arrays (diff)
downloadcuberite-d73cdba1f66a92f011ac881b581595c0959139ef.tar
cuberite-d73cdba1f66a92f011ac881b581595c0959139ef.tar.gz
cuberite-d73cdba1f66a92f011ac881b581595c0959139ef.tar.bz2
cuberite-d73cdba1f66a92f011ac881b581595c0959139ef.tar.lz
cuberite-d73cdba1f66a92f011ac881b581595c0959139ef.tar.xz
cuberite-d73cdba1f66a92f011ac881b581595c0959139ef.tar.zst
cuberite-d73cdba1f66a92f011ac881b581595c0959139ef.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 8dfbbeef5..a75828461 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -883,7 +883,7 @@ void cChunk::ApplyWeatherToTop()
FastSetBlock(X, Height, Z, E_BLOCK_SNOW, TopMeta - 1);
}
}
- else if (g_BlockIsSnowable[TopBlock])
+ else if (cBlockInfo::IsSnowable(TopBlock))
{
SetBlock(X, Height + 1, Z, E_BLOCK_SNOW, 0);
}
@@ -1540,10 +1540,10 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
SetNibble(m_BlockMeta, index, a_BlockMeta);
// ONLY recalculate lighting if it's necessary!
- if(
- (g_BlockLightValue[OldBlockType ] != g_BlockLightValue[a_BlockType]) ||
- (g_BlockSpreadLightFalloff[OldBlockType] != g_BlockSpreadLightFalloff[a_BlockType]) ||
- (g_BlockTransparent[OldBlockType] != g_BlockTransparent[a_BlockType])
+ if (
+ (cBlockInfo::GetLightValue (OldBlockType) != cBlockInfo::GetLightValue (a_BlockType)) ||
+ (cBlockInfo::GetSpreadLightFalloff(OldBlockType) != cBlockInfo::GetSpreadLightFalloff(a_BlockType)) ||
+ (cBlockInfo::IsTransparent (OldBlockType) != cBlockInfo::IsTransparent (a_BlockType))
)
{
m_IsLightValid = false;