Les chunks ne sont plus une copie du même chunk!

This commit is contained in:
Marc-Eric Martel
2021-11-02 13:25:24 -04:00
parent eee251dabf
commit 65e56c8678
4 changed files with 20 additions and 8 deletions

View File

@@ -48,16 +48,24 @@ void Engine::Init()
m_audio.ToggleMusicState();
// Init Chunks
for (int x = 0; x < CHUNK_SIZE_X; ++x)
/*for (int x = 0; x < CHUNK_SIZE_X; ++x)
for (int z = 0; z < CHUNK_SIZE_Z; ++z)
for (int y = 0; y < 32; ++y)
m_testChunk.SetBlock(x, y, z, BTYPE_DIRT);
m_testChunk->SetBlock(x, y, z, BTYPE_DIRT);*/
for (int chx = 0; chx < VIEW_DISTANCE; ++chx)
for (int chy = 0; chy < VIEW_DISTANCE; ++chy)
m_chunks.Set(chx, chy, &m_testChunk);
for (int chy = 0; chy < VIEW_DISTANCE; ++chy) {
m_chunks.Set(chx, chy, new Chunk(chx, chy));
//m_chunks.Set(0, 0, &m_testChunk);
for (int x = 0; x < CHUNK_SIZE_X; ++x)
for (int z = 0; z < CHUNK_SIZE_Z; ++z)
for (int y = 0; y < 32; ++y)
m_chunks.Get(chx,chy)->SetBlock(x, y, z, BTYPE_DIRT);
m_chunks.Get(chx,chy)->SetBlock(8, chx+32, 8, BTYPE_DIRT);
}
// Gestion de souris.
CenterMouse();