aboutsummaryrefslogtreecommitdiffstats
path: root/src/UIClass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/UIClass.cpp')
-rw-r--r--src/UIClass.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/UIClass.cpp b/src/UIClass.cpp
index 00456f5..46c7124 100644
--- a/src/UIClass.cpp
+++ b/src/UIClass.cpp
@@ -19,8 +19,10 @@ void UIClass::handleEvents(){
if(e.key.keysym.sym == SDLK_a) player.left = true;
if(e.key.keysym.sym == SDLK_LSHIFT) player.speed = 3;
if(e.key.keysym.sym == SDLK_SPACE){
- player.loc.y += HLINE*1.2;
- player.vel.y += .004;
+ if(player.vel.y<=0){
+ player.loc.y += HLINE*1.2;
+ player.vel.y += .004;
+ }
}
if(e.key.keysym.sym == SDLK_i){
if(currentWorld->behind){