aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-09-19 08:23:11 -0400
committerClyne Sullivan <tullivan99@gmail.com>2015-09-19 08:23:11 -0400
commitb806a2d9bd6932525263a172ea2837eb1a94717d (patch)
tree5b77d63edebf66df11ae29229eaf4c44223f6f7b /src/ui.cpp
parent1f3fee78514fb097834a2cb4235aaad3bdf639e7 (diff)
stuff
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;