diff options
author | LaG1924 <lag1924@gmail.com> | 2021-12-25 07:20:36 +0100 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-12-25 07:20:36 +0100 |
commit | 749e24c0ca1ea5d1d3166ce52ca98601135e0bcc (patch) | |
tree | 1c8a6c6a20f23f95d82b6792530ade91bc4303e4 /src/RendererWorld.cpp | |
parent | Added per vertex lighting (diff) | |
download | AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.tar AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.tar.gz AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.tar.bz2 AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.tar.lz AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.tar.xz AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.tar.zst AltCraft-749e24c0ca1ea5d1d3166ce52ca98601135e0bcc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/RendererWorld.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp index 21f0db2..057cf1e 100644 --- a/src/RendererWorld.cpp +++ b/src/RendererWorld.cpp @@ -57,13 +57,13 @@ void RendererWorld::ParseQueueUpdate() { vec.y -= 4500; } - parsing[id].data.section = GetGameState()->GetWorld().GetSection(vec); - parsing[id].data.north = GetGameState()->GetWorld().GetSection(vec + Vector(0, 0, 1)); - parsing[id].data.south = GetGameState()->GetWorld().GetSection(vec + Vector(0, 0, -1)); - parsing[id].data.west = GetGameState()->GetWorld().GetSection(vec + Vector(1, 0, 0)); - parsing[id].data.east = GetGameState()->GetWorld().GetSection(vec + Vector(-1, 0, 0)); - parsing[id].data.bottom = GetGameState()->GetWorld().GetSection(vec + Vector(0, -1, 0)); - parsing[id].data.top = GetGameState()->GetWorld().GetSection(vec + Vector(0, 1, 0)); + for (int x = -1; x < 2; x++) { + for (int y = -1; y < 2; y++) { + for (int z = -1; z < 2; z++) { + parsing[id].data.data[x + 1][y + 1][z + 1] = GetGameState()->GetWorld().GetSection(vec + Vector(x, y, z)); + } + } + } parsing[id].parsing = true; @@ -97,7 +97,7 @@ void RendererWorld::ParseQeueueRemoveUnnecessary() { bool skip = false; for (int i = 0; i < RendererWorld::parsingBufferSize; i++) { - if (parsing[i].data.section.GetHash() == section.GetHash()) { + if (parsing[i].data.data[1][1][1].GetHash() == section.GetHash()) { skip = true; break; } |