This commit is contained in:
MarcEricMartel
2023-12-09 15:54:06 -05:00
parent 461a8aa11b
commit 46298f8256
3 changed files with 28 additions and 16 deletions

View File

@@ -202,8 +202,8 @@ void Server::Run() {
m_conns.erase(key);
continue;
}
int x = (rand() % (CHUNK_SIZE_X * WORLD_SIZE_X - 1) - (CHUNK_SIZE_X * WORLD_SIZE_X / 2)) / 4,
y = (rand() % (CHUNK_SIZE_Y * WORLD_SIZE_Y - 1) - (CHUNK_SIZE_Y * WORLD_SIZE_Y / 2)) / 4;
int x = (rand() % (CHUNK_SIZE_X * WORLD_SIZE_X - 1) - (CHUNK_SIZE_X * WORLD_SIZE_X / 2)) / 8,
y = (rand() % (CHUNK_SIZE_Y * WORLD_SIZE_Y - 1) - (CHUNK_SIZE_Y * WORLD_SIZE_Y / 2)) / 8;
conn->player = new Player(Vector3f(x + .5f, CHUNK_SIZE_Y + 1.8f, y + .5f));
conn->player->m_username = conn->GetName();
m_players[key] = conn->player;