summaryrefslogtreecommitdiffstats
path: root/src/RendererSection.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-12 17:09:16 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-12 17:09:16 +0200
commit45de7d0537d2caec7d0a7ede48e2b72301bc9da9 (patch)
treeaf17dd093da09dc77a3a07a3d4835a1b5e5b85f6 /src/RendererSection.cpp
parent2017-08-07 (diff)
downloadAltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.gz
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.bz2
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.lz
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.xz
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.zst
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.zip
Diffstat (limited to '')
-rw-r--r--src/RendererSection.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/RendererSection.cpp b/src/RendererSection.cpp
index fbb9c19..439fab1 100644
--- a/src/RendererSection.cpp
+++ b/src/RendererSection.cpp
@@ -187,7 +187,7 @@ void RendererSection::PrepareResources() {
for (int y = 0; y < 16; y++) {
for (int z = 0; z < 16; z++) {
for (int x = 0; x < 16; x++) {
- Vector blockPos = Vector(x, y, z) + (sectionPosition * 16);
+ Vector blockPos = Vector(x, y, z) + (sectionPosition * 16u);
Block block = world->GetBlock(blockPos);
if (block.id == 0)
continue;
@@ -214,9 +214,7 @@ void RendererSection::PrepareResources() {
continue;
glm::mat4 transform;
- transform = glm::translate(transform, glm::vec3(sectionPosition.GetX() * 16,
- sectionPosition.GetY() * 16,
- sectionPosition.GetZ() * 16));
+ transform = glm::translate(transform, glm::vec3 (sectionPosition * 16u));
transform = glm::translate(transform, glm::vec3(x, y, z));
glm::vec3 biomeColor(0.275, 0.63, 0.1);
glm::vec3 color(0.0f, 0.0f, 0.0f);