Crosby, Still, Jump and Shoot
This commit is contained in:
parent
f0afdf828e
commit
4e0a9cea35
@ -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;
|
||||
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user