From 0782f37e0a1f5200daea2643bc6c8d768fb983f1 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 16 Dec 2023 16:43:25 -0500 Subject: [PATCH] Might as well jump, JUMP! --- SQCSim-common/player.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SQCSim-common/player.cpp b/SQCSim-common/player.cpp index 5d73e3e..5b322d5 100644 --- a/SQCSim-common/player.cpp +++ b/SQCSim-common/player.cpp @@ -124,15 +124,19 @@ Player::Sound Player::ApplyPhysics(Vector3f input, World* world, float elapsedTi bt2 = world->BlockAt(GetPosition().x + input.x, GetPosition().y - 0.9f, GetPosition().z); bt3 = world->BlockAt(GetPosition().x + input.x, GetPosition().y - 1.7f, GetPosition().z); if (bt1 != BTYPE_AIR || bt2 != BTYPE_AIR || bt3 != BTYPE_AIR) { - input.x = m_velocity.x = 0; + //input.x = m_velocity.x = 0; + m_velocity.y += .04f; m_velocity.z *= .5f; + m_velocity.x *= .5f; } bt1 = world->BlockAt(GetPosition().x, GetPosition().y, GetPosition().z + input.z); bt2 = world->BlockAt(GetPosition().x, GetPosition().y - 0.9f, GetPosition().z + input.z); bt3 = world->BlockAt(GetPosition().x, GetPosition().y - 1.7f, GetPosition().z + input.z); if (bt1 != BTYPE_AIR || bt2 != BTYPE_AIR || bt3 != BTYPE_AIR) { - input.z = m_velocity.z = 0; + //input.z = m_velocity.z = 0; + m_velocity.y += .04f; + m_velocity.z *= .5f; m_velocity.x *= .5f; }