diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-21 02:33:30 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-21 02:33:30 +0200 |
commit | bd948fec3d82e117c0d66a435af949182adf2477 (patch) | |
tree | 78e67f954b2d8d6fe64f3189e96d199ee4f089de | |
parent | 9d5cfe532a277e31afb305b0742942e3f8cbbf2d (diff) |
Use KMOD_SHIFT in Player::update instead of manual OR-ing.
-rw-r--r-- | player.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -34,7 +34,7 @@ void Player::draw() { void Player::update() { Uint8 *keystate = SDL_GetKeyState(NULL); - float factor = move_factor * (SDL_GetModState() & (KMOD_LSHIFT | KMOD_RSHIFT) ? focus_factor : 1); + float factor = move_factor * (SDL_GetModState() & KMOD_SHIFT ? focus_factor : 1); float x_speed = factor * keystate[SDLK_RIGHT] - factor * keystate[SDLK_LEFT]; float y_speed = factor * keystate[SDLK_UP] - factor * keystate[SDLK_DOWN]; |