From 22b71d041046112e38c7b395940e3d1ac36b0ca7 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 11 Feb 2013 19:53:52 +0000 Subject: Added a forgotten part of the cBlockArea::FillRelCuboid() function. Now meta, blocklight and skylight can be filled, too git-svn-id: http://mc-server.googlecode.com/svn/trunk@1209 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockArea.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source') diff --git a/source/BlockArea.cpp b/source/BlockArea.cpp index b87d2ecfa..0386a74a5 100644 --- a/source/BlockArea.cpp +++ b/source/BlockArea.cpp @@ -695,6 +695,27 @@ void cBlockArea::FillRelCuboid(int a_MinRelX, int a_MaxRelX, int a_MinRelY, int m_BlockTypes[MakeIndex(x, y, z)] = a_BlockType; } // for x, z, y } + if ((a_DataTypes & baMetas) != 0) + { + for (int y = a_MinRelY; y <= a_MaxRelY; y++) for (int z = a_MinRelZ; z <= a_MaxRelZ; z++) for (int x = a_MinRelX; x <= a_MaxRelX; x++) + { + m_BlockMetas[MakeIndex(x, y, z)] = a_BlockMeta; + } // for x, z, y + } + if ((a_DataTypes & baLight) != 0) + { + for (int y = a_MinRelY; y <= a_MaxRelY; y++) for (int z = a_MinRelZ; z <= a_MaxRelZ; z++) for (int x = a_MinRelX; x <= a_MaxRelX; x++) + { + m_BlockLight[MakeIndex(x, y, z)] = a_BlockLight; + } // for x, z, y + } + if ((a_DataTypes & baSkyLight) != 0) + { + for (int y = a_MinRelY; y <= a_MaxRelY; y++) for (int z = a_MinRelZ; z <= a_MaxRelZ; z++) for (int x = a_MinRelX; x <= a_MaxRelX; x++) + { + m_BlockSkyLight[MakeIndex(x, y, z)] = a_BlockSkyLight; + } // for x, z, y + } } -- cgit v1.2.3