diff options
Diffstat (limited to 'src/systems')
-rw-r--r-- | src/systems/pondering.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/systems/pondering.cpp b/src/systems/pondering.cpp index d3601ac..02d5cfc 100644 --- a/src/systems/pondering.cpp +++ b/src/systems/pondering.cpp | |||
@@ -39,6 +39,12 @@ void PonderingSystem::tick(double dt) | |||
39 | ponderable.setVelocityY( | 39 | ponderable.setVelocityY( |
40 | ponderable.getVelocityY() + ponderable.getAccelY() * dt); | 40 | ponderable.getVelocityY() + ponderable.getAccelY() * dt); |
41 | 41 | ||
42 | if ((ponderable.getType() == PonderableComponent::Type::freefalling) | ||
43 | && (ponderable.getVelocityY() > TERMINAL_VELOCITY)) | ||
44 | { | ||
45 | ponderable.setVelocityY(TERMINAL_VELOCITY); | ||
46 | } | ||
47 | |||
42 | const double oldX = transformable.getX(); | 48 | const double oldX = transformable.getX(); |
43 | const double oldY = transformable.getY(); | 49 | const double oldY = transformable.getY(); |
44 | const double oldRight = oldX + transformable.getW(); | 50 | const double oldRight = oldX + transformable.getW(); |