DoubleJumping now in InputController instead.

This commit is contained in:
verysecrethero
2016-02-02 15:10:11 +01:00
parent 2085d9ec9e
commit 45a92b362f
3 changed files with 13 additions and 10 deletions
+3 -3
View File
@@ -76,12 +76,12 @@ void PlayerMovementSystem::Update(double dt)
ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
}
if (controller->Jumping() && !controller->Crouching() && (velocity.y == 0.f || !m_DoubleJumped)) {
if (controller->Jumping() && !controller->Crouching() && (velocity.y == 0.f || !controller->DoubleJumping())) {
if (velocity.y == 0.f) {
m_DoubleJumped = false;
controller->SetDoubleJumping(false);
}
else {
m_DoubleJumped = true;
controller->SetDoubleJumping(true);
}
velocity.y += 4.f;
}