From 1338caba885cc82c61377053764f63654714f8e0 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 27 May 2012 17:30:52 +0000 Subject: Added a snow finisher generator git-svn-id: http://mc-server.googlecode.com/svn/trunk@514 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/FinishGen.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/source/FinishGen.cpp b/source/FinishGen.cpp index b2f4eab78..8f6f747b2 100644 --- a/source/FinishGen.cpp +++ b/source/FinishGen.cpp @@ -126,7 +126,31 @@ void cFinishGenSnow::GenFinish( cBlockEntityList & a_BlockEntities // Block entities may be added or deleted ) { - // TODO: Add snow block in snowy biomes onto blocks that can be snowed over + // Add a snow block in snowy biomes onto blocks that can be snowed over + for (int z = 0; z < cChunkDef::Width; z++) + { + for (int x = 0; x < cChunkDef::Width; x++) + { + switch (cChunkDef::GetBiome(a_BiomeMap, x, z)) + { + case biIcePlains: + case biIceMountains: + case biTaiga: + case biTaigaHills: + case biFrozenRiver: + case biFrozenOcean: + { + int Height = cChunkDef::GetHeight(a_HeightMap, x, z); + if (g_BlockIsSnowable[cChunkDef::GetBlock(a_BlockTypes, x, Height, z)]) + { + cChunkDef::SetBlock(a_BlockTypes, x, Height + 1, z, E_BLOCK_SNOW); + cChunkDef::SetHeight(a_HeightMap, x, z, Height + 1); + } + break; + } + } + } + } // for z } -- cgit v1.2.3