correction
This commit is contained in:
parent
80a5bf90b4
commit
c98625a610
@ -39,14 +39,22 @@ void World::RemoveChunk(int nbReduit)
|
||||
for (int x = 0; x < WORLD_SIZE_X; ++x)
|
||||
for (int y = 0; y < WORLD_SIZE_Y; ++y)
|
||||
{
|
||||
Chunk* chk = nullptr;
|
||||
if (x < nbReduit)
|
||||
m_chunks.Remove(x,y);
|
||||
chk = m_chunks.Remove(x, y);
|
||||
if (y < nbReduit)
|
||||
m_chunks.Remove(x, y);
|
||||
chk = m_chunks.Remove(x, y);
|
||||
if (y > WORLD_SIZE_Y - nbReduit)
|
||||
m_chunks.Remove(x, y);
|
||||
chk = m_chunks.Remove(x, y);
|
||||
if (x > WORLD_SIZE_X - nbReduit)
|
||||
m_chunks.Remove(x, y);
|
||||
chk = m_chunks.Remove(x, y);
|
||||
|
||||
// TODO: MakeDirty() les voisins pour qu'ils se redessinent.
|
||||
|
||||
if (!chk)
|
||||
continue;
|
||||
|
||||
m_tbDeleted.emplace_back(chk);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user