From 14be450f094202499e62cd2faefa0f1d79b7ac5c Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Mon, 20 Nov 2023 16:27:19 -0500 Subject: [PATCH 1/2] :notes: You spin me right round, baby, right round, like a record, baby, right round, round, round :notes: --- SQCSim2021/engine.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index f70d1a7..dc9b983 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1091,6 +1091,7 @@ void Engine::Render(float elapsedTime) { static irrklang::ISound* step; // Pour les sons de pas. static float pollTime = 0; static float bulletTime = 0; + static float gameTime = 0; static BlockType bloc = 1; if (elapsedTime > 0.1f) return; @@ -1196,24 +1197,20 @@ void Engine::Render(float elapsedTime) { } } + gameTime += elapsedTime * 10; - m_remotePlayer.ApplyPhysics(Vector3f(0,0,0), &m_world, elapsedTime); - //m_remotePlayer.ApplyTransformation(remotePlayer, false); + 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({ 120,20,120 }, m_textureAtlas, texBoostHeal, m_shader01, all); - if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas); - - //glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - //m_remotePlayer.Render(m_textureAtlas, m_shader01, all, elapsedTime); - + m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas); if (m_isSkybox) m_skybox.Render(skybox); - - DrawHud(elapsedTime, bloc); DisplayPovGun(); ProcessNotificationQueue(); From 49b90509b91d882929915632ffbcecda0b3ceaf5 Mon Sep 17 00:00:00 2001 From: Frederic Leger <57264593+freeedleger@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:27:59 -0500 Subject: [PATCH 2/2] ajustement booster --- SQCSim2021/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index f70d1a7..e13c2ae 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1202,7 +1202,7 @@ void Engine::Render(float 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({ 120,20,120 }, m_textureAtlas, texBoostHeal, m_shader01, all); + m_booster.RenderBillboard({ 195,16,195 }, m_textureAtlas, texBoostHeal, m_shader01, all); if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas);