diff --git a/SQCSim-srv/connection.cpp b/SQCSim-srv/connection.cpp index 2c1948b..61961cf 100644 --- a/SQCSim-srv/connection.cpp +++ b/SQCSim-srv/connection.cpp @@ -146,7 +146,7 @@ Timestamp Connection::Run(World* world) { out.states.jumping = player->GetIsAirborne(); //abs(player->GetVelocity().y) > .2f; out.states.running = player->GetVelocity().Length() > .5f; - out.states.still = !out.states.running; + out.states.still = !out.states.running && !out.states.jumping; out.states.hit = player->m_hit; player->m_hit = false; diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 88472a1..c39e2fc 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1287,15 +1287,15 @@ void Engine::Render(float elapsedTime) { for (int b = 0; b < BULLET_UPDATES_PER_FRAME; ++b) { if (m_bullets[x]->Update(&m_world, elapsedTime, BULLET_UPDATES_PER_FRAME, m_players, m_networkgame ? &m_chunkmod : nullptr)) { m_bullets[x]->~Bullet(); - if (m_whoosh[x]) - m_whoosh[x]->drop(); - m_bullets[x] = nullptr; + //if (m_whoosh[x]) + // m_whoosh[x]->drop(); + //m_bullets[x] = nullptr; m_whoosh[x] = nullptr; break; } - else if (!m_whoosh[x]) { - m_whoosh[x] = m_audio.Create3DAudioObj(m_whoosh[x], AUDIO_PATH "noise.wav", m_bullets[x]->getPos(), m_bullets[x]->getVel(), true, (m_bullets[x]->getPos() - m_player.GetPosition()).Length()); - } + // else if (!m_whoosh[x]) { + // m_whoosh[x] = m_audio.Create3DAudioObj(m_whoosh[x], AUDIO_PATH "noise.wav", m_bullets[x]->getPos(), m_bullets[x]->getVel(), true, (m_bullets[x]->getPos() - m_player.GetPosition()).Length()); + // } else { Vector3f pos = m_bullets[x]->getPos(), vel = m_bullets[x]->getVel(); m_audio.Render3DAudioObj(m_whoosh[x], pos, vel, 5 - (m_bullets[x]->getPos() - m_player.GetPosition()).Length());