summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockSnow.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Blocks/BlockSnow.h')
-rw-r--r--source/Blocks/BlockSnow.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/Blocks/BlockSnow.h b/source/Blocks/BlockSnow.h
index 2a5009b69..f150f497c 100644
--- a/source/Blocks/BlockSnow.h
+++ b/source/Blocks/BlockSnow.h
@@ -29,10 +29,9 @@ public:
}
- virtual bool CanBeAt(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
+ virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
- BLOCKTYPE UnderlyingBlock = a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ);
- return g_BlockIsSnowable[UnderlyingBlock];
+ return (a_RelY > 0) && g_BlockIsSnowable[a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)];
}