aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index d7aabc0..5d3e143 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -89,11 +89,12 @@ namespace ui {
case SDL_KEYDOWN:
if(SDL_KEY==SDLK_ESCAPE)gameRunning=false;
if(SDL_KEY==SDLK_a)player->vel.x=-2;
- else if(SDL_KEY==SDLK_d)player->vel.x=2;
+ if(SDL_KEY==SDLK_d)player->vel.x=2;
+ if(SDL_KEY==SDLK_SPACE)player->vel.y=2;
break;
case SDL_KEYUP:
if(SDL_KEY==SDLK_a)player->vel.x=0;
- else if(SDL_KEY==SDLK_d)player->vel.x=0;
+ if(SDL_KEY==SDLK_d)player->vel.x=0;
break;
default:
break;