SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
Showing only changes of commit 9ed8ef3273 - Show all commits

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();