Moar random?

This commit is contained in:
MarcEricMartel 2023-12-03 11:14:08 -05:00
parent 4aa0aedd61
commit 9ed8ef3273

View File

@ -200,7 +200,8 @@ void Server::Run() {
m_world->BuildWorld();
for (auto& [key, conn] : m_players) { // Creation des instances de joueurs et premier sync.
int x = rand() % (CHUNK_SIZE_X + WORLD_SIZE_X - 1), y = rand() % (CHUNK_SIZE_Y + WORLD_SIZE_Y - 1);
int x = (rand() % (CHUNK_SIZE_X * WORLD_SIZE_X - 1)) - (CHUNK_SIZE_X * WORLD_SIZE_X / 2),
y = (rand() % (CHUNK_SIZE_Y * WORLD_SIZE_Y - 1)) - (CHUNK_SIZE_Y * WORLD_SIZE_Y / 2);
conn->player = std::make_unique<Player>(Vector3f(x + .5f, CHUNK_SIZE_Y + 1.8f, y + .5f));
Sync sync;
sync.position = conn->player->GetPositionAbs();