summaryrefslogtreecommitdiffstats
path: root/src/RendererSectionData.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-03-30 00:31:56 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-03-30 01:01:51 +0200
commitb9a64733eccac3197d0c768050577aa2e6f59249 (patch)
treef44be33cc54c7189d592556aefa4d3e3be971df6 /src/RendererSectionData.cpp
parentImproved frustum culling: replaced box testing to sphere testing #6 (diff)
downloadAltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.tar
AltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.tar.gz
AltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.tar.bz2
AltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.tar.lz
AltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.tar.xz
AltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.tar.zst
AltCraft-b9a64733eccac3197d0c768050577aa2e6f59249.zip
Diffstat (limited to 'src/RendererSectionData.cpp')
-rw-r--r--src/RendererSectionData.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/RendererSectionData.cpp b/src/RendererSectionData.cpp
index 6554d16..ab3812d 100644
--- a/src/RendererSectionData.cpp
+++ b/src/RendererSectionData.cpp
@@ -183,25 +183,7 @@ RendererSectionData ParseSection(const SectionsData &sections)
unsigned char skyLight = sections.GetSkyLight(vec);
const BlockModel* model = GetInternalBlockModel(block, idModels);
- if (model) {
- AddFacesByBlockModel(data, *model, transform, blockVisibility[y * 256 + z * 16 + x], light, skyLight);
- }
- else {
- transform = glm::translate(transform, glm::vec3(0, 1, 0));
-
- if (block.id == 8 || block.id == 9) {
- data.textures.push_back(AssetManager::Instance().GetTextureByAssetName("minecraft/textures/blocks/water_still"));
- data.textures.back().w /= 32.0f;
- transform = glm::translate(transform, glm::vec3(0, -0.2, 0));
- }
- else
- data.textures.push_back(AssetManager::Instance().GetTextureByAssetName("minecraft/textures/blocks/tnt_side"));
-
- data.models.push_back(transform);
- data.colors.push_back(glm::vec3(0, 0, 0));
- data.lights.push_back(glm::vec2(light, skyLight));
- }
-
+ AddFacesByBlockModel(data, *model, transform, blockVisibility[y * 256 + z * 16 + x], light, skyLight);
}
}
}