Prevented snow from killing grass
This commit is contained in:
parent
032ce6b95e
commit
c921f47d85
@ -51,8 +51,10 @@ public:
|
|||||||
{
|
{
|
||||||
BLOCKTYPE above = a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ);
|
BLOCKTYPE above = a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ);
|
||||||
|
|
||||||
// Grass turns back to dirt when the block above it is not transparent or water
|
// Grass turns back to dirt when the block above it is not transparent or water.
|
||||||
if (!cBlockInfo::IsTransparent(above) || IsBlockWater(above))
|
// It does not turn to dirt when a snow layer is above.
|
||||||
|
if ((above != E_BLOCK_SNOW) &&
|
||||||
|
(!cBlockInfo::IsTransparent(above) || IsBlockWater(above)))
|
||||||
{
|
{
|
||||||
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_DIRT, E_META_DIRT_NORMAL);
|
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_DIRT, E_META_DIRT_NORMAL);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user