SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit b50a2f44e2 - Show all commits

View File

@ -9,7 +9,7 @@ Array2d<Chunk*>& World::GetChunks() { return m_chunks; }
void World::BuildWorld() {
for (int x = 0; x < WORLD_SIZE_X; ++x)
for (int y = 0; y < WORLD_SIZE_Y; ++y)
m_chunks.Set(x - m_center[0], y - m_center[1], new Chunk(x + m_center[0], y + m_center[1], m_seed));
m_chunks.Set(x, y, new Chunk(x + m_center[0], y + m_center[1], m_seed));
}
void World::SetSeed(uint64_t seed) {

View File

@ -182,7 +182,8 @@ void Server::Run() {
m_world = std::make_unique<World>();
m_world->SetSeed(m_game.seed);
//m_world->BuildWorld();
m_world->GetChunks().Reset(nullptr);
m_world->BuildWorld();
for (auto& [key, conn] : m_players) { // Creation des instances de joueurs et premier sync.
conn->player = std::make_unique<Player>(Vector3f(8.5f, CHUNK_SIZE_Y + 1.8f, 8.5f));