diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-03-13 15:30:05 +0100 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-03-13 16:41:49 +0100 |
commit | cf647ebf504eb523d822fa79622cb59d009680da (patch) | |
tree | efaa792f312bb18db07c94d1460801209279ed3f /src/RendererSectionData.cpp | |
parent | Fixed holes when block on section border destroyed (diff) | |
download | AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.tar AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.tar.gz AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.tar.bz2 AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.tar.lz AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.tar.xz AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.tar.zst AltCraft-cf647ebf504eb523d822fa79622cb59d009680da.zip |
Diffstat (limited to '')
-rw-r--r-- | src/RendererSectionData.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RendererSectionData.cpp b/src/RendererSectionData.cpp index 1ed1099..067728f 100644 --- a/src/RendererSectionData.cpp +++ b/src/RendererSectionData.cpp @@ -289,7 +289,7 @@ RendererSectionData ParseSection(World * world, Vector sectionPosition) const BlockModel* model = GetInternalBlockModel(block, idModels); if (model) { - AddFacesByBlockModel(sectionsList, world, Vector(x, y, z), *model, transform, section.GetBlockLight(Vector(x, y, z)), section.GetBlockSkyLight(Vector(x, y, z)), blockVisibility, textureName, data); + AddFacesByBlockModel(sectionsList, world, Vector(x, y, z), *model, transform, world->GetBlockLight(Vector(x, y, z) + sectionPosition * 16), world->GetBlockSkyLight(Vector(x, y, z) + sectionPosition * 16), blockVisibility, textureName, data); } else { transform = glm::translate(transform, glm::vec3(0, 1, 0)); @@ -304,7 +304,7 @@ RendererSectionData ParseSection(World * world, Vector sectionPosition) data.models.push_back(transform); data.colors.push_back(glm::vec3(0, 0, 0)); - data.lights.push_back(glm::vec2(16, 16)); + data.lights.push_back(glm::vec2(world->GetBlockLight(Vector(x, y, z) + sectionPosition * 16), world->GetBlockSkyLight(Vector(x, y, z) + sectionPosition * 16))); } } |