Moar random?
This commit is contained in:
parent
4aa0aedd61
commit
9ed8ef3273
@ -200,7 +200,8 @@ void Server::Run() {
|
|||||||
m_world->BuildWorld();
|
m_world->BuildWorld();
|
||||||
|
|
||||||
for (auto& [key, conn] : m_players) { // Creation des instances de joueurs et premier sync.
|
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));
|
conn->player = std::make_unique<Player>(Vector3f(x + .5f, CHUNK_SIZE_Y + 1.8f, y + .5f));
|
||||||
Sync sync;
|
Sync sync;
|
||||||
sync.position = conn->player->GetPositionAbs();
|
sync.position = conn->player->GetPositionAbs();
|
||||||
|
Loading…
Reference in New Issue
Block a user