Corrections dans le générateur pour le MakeDirty au bout du monde
This commit is contained in:
parent
cdc926bb39
commit
2ec9170fe3
@ -54,7 +54,8 @@ void World::TransposeWorld(Player& player, Bullet* bullets[MAX_BULLETS]) {
|
|||||||
if (ax - x >= 0) {
|
if (ax - x >= 0) {
|
||||||
m_chunks.Set(ax - x, ay,
|
m_chunks.Set(ax - x, ay,
|
||||||
m_chunks.Remove(ax, ay));
|
m_chunks.Remove(ax, ay));
|
||||||
if (ax == WORLD_SIZE_X - 1) m_chunks.Get(ax - x, ay)->MakeDirty();
|
if (ax == WORLD_SIZE_X - 1 && m_chunks.Get(ax - x, ay))
|
||||||
|
m_chunks.Get(ax - x, ay)->MakeDirty();
|
||||||
}
|
}
|
||||||
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
||||||
}
|
}
|
||||||
@ -64,7 +65,8 @@ void World::TransposeWorld(Player& player, Bullet* bullets[MAX_BULLETS]) {
|
|||||||
if (ax - x < WORLD_SIZE_X) {
|
if (ax - x < WORLD_SIZE_X) {
|
||||||
m_chunks.Set(ax - x, ay,
|
m_chunks.Set(ax - x, ay,
|
||||||
m_chunks.Remove(ax, ay));
|
m_chunks.Remove(ax, ay));
|
||||||
if (ax + x == 0) m_chunks.Get(ax + x, ay)->MakeDirty();
|
if (ax == 0 && m_chunks.Get(ax - x, ay))
|
||||||
|
m_chunks.Get(ax - x, ay)->MakeDirty();
|
||||||
}
|
}
|
||||||
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
||||||
}
|
}
|
||||||
@ -75,7 +77,8 @@ void World::TransposeWorld(Player& player, Bullet* bullets[MAX_BULLETS]) {
|
|||||||
if (ay - y >= 0) {
|
if (ay - y >= 0) {
|
||||||
m_chunks.Set(ax, ay - y,
|
m_chunks.Set(ax, ay - y,
|
||||||
m_chunks.Remove(ax, ay));
|
m_chunks.Remove(ax, ay));
|
||||||
if (ay == WORLD_SIZE_Y) m_chunks.Get(ax, ay - y)->MakeDirty();
|
if (ay == WORLD_SIZE_Y - 1 && m_chunks.Get(ax, ay - y))
|
||||||
|
m_chunks.Get(ax, ay - y)->MakeDirty();
|
||||||
}
|
}
|
||||||
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
||||||
}
|
}
|
||||||
@ -85,7 +88,8 @@ void World::TransposeWorld(Player& player, Bullet* bullets[MAX_BULLETS]) {
|
|||||||
if (ay - y < WORLD_SIZE_Y) {
|
if (ay - y < WORLD_SIZE_Y) {
|
||||||
m_chunks.Set(ax, ay - y,
|
m_chunks.Set(ax, ay - y,
|
||||||
m_chunks.Remove(ax, ay));
|
m_chunks.Remove(ax, ay));
|
||||||
if (ay - x == 0) m_chunks.Get(ax, ay - y)->MakeDirty();
|
if (ay == 0 && m_chunks.Get(ax, ay - y))
|
||||||
|
m_chunks.Get(ax, ay - y)->MakeDirty();
|
||||||
}
|
}
|
||||||
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
else if (m_chunks.Get(ax, ay)) m_tbDeleted.emplace_back(m_chunks.Remove(ax, ay));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user