diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index e724269..17945e2 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -190,7 +190,7 @@ void Server::Run() { m_world->BuildWorld(); for (auto& [key, conn] : m_players) { // Creation des instances de joueurs et premier sync. - conn->player = std::make_unique(Vector3f(8.5f, CHUNK_SIZE_Y + 1.8f, 8.5f)); + conn->player = std::make_unique(Vector3f(128.5f, CHUNK_SIZE_Y + 1.8f, 128.5f)); Sync sync; sync.position = conn->player->GetPosition(); sync.hp = conn->player->GetHP(); diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index a2308ef..7e19b7c 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1241,13 +1241,19 @@ void Engine::Render(float elapsedTime) { gameTime += elapsedTime * 10; - Vector3f dance = Vector3f(sin(gameTime), 0, cos(-gameTime)); - dance.Normalize(); - m_remotePlayer.ApplyPhysics(dance, &m_world, elapsedTime); + for (auto& [key, player] : m_players) { + RemotePlayer* rt = (RemotePlayer*)player; + rt->Render(m_animeAtlas, m_shader01, all, elapsedTime); + } + + //Vector3f dance = Vector3f(sin(gameTime), 0, cos(-gameTime)); + //dance.Normalize(); + //m_remotePlayer.ApplyPhysics(dance, &m_world, elapsedTime); m_world.Update(m_bullets, m_player.GetPosition(), m_blockinfo); m_renderer.UpdateMesh(&m_world, m_player.GetPosition(), m_blockinfo); - m_remotePlayer.Render(m_animeAtlas, m_shader01, all, elapsedTime); - m_booster.RenderBillboard({ 195,16,195 }, m_textureAtlas, m_shader01, all); + //m_remotePlayer.Render(m_animeAtlas, m_shader01, all, elapsedTime); + + //m_booster.RenderBillboard({ 195,16,195 }, m_textureAtlas, m_shader01, all); if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas);