aboutsummaryrefslogtreecommitdiff
path: root/src/GameLoop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameLoop.cpp')
-rw-r--r--src/GameLoop.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp
index 8a1af59..cc383c8 100644
--- a/src/GameLoop.cpp
+++ b/src/GameLoop.cpp
@@ -38,12 +38,6 @@ void handleKey(Game* game, int key, int action, int mods)
{
if (action != GLFW_PRESS)
return;
- if (game->menu) {
- if (key == GLFW_KEY_SPACE)
- setMenu(game, false);
- return;
- }
-
auto& player = game->person[0];
if (key == GLFW_KEY_ESCAPE) {
alSourcePause(gSourceID[rainsound]);
@@ -63,9 +57,9 @@ void handleKey(Game* game, int key, int action, int mods)
alSourcef(gSourceID[mainmenusong], AL_MIN_GAIN, 0);
alSourcePlay(gSourceID[game->whichsong]);
alSourcef(gSourceID[game->whichsong], AL_MIN_GAIN, 1);
- } else if (key == GLFW_KEY_L) {
+ } else if (key == keymap.laser_sight) {
game->lasersight ^= 1;
- } else if (key == GLFW_KEY_SPACE) {
+ } else if (key == keymap.dive) {
if (player.playerrotation == player.playerlowrotation
&& player.targetanimation == joganim
&& player.currentanimation == joganim
@@ -74,7 +68,7 @@ void handleKey(Game* game, int key, int action, int mods)
player.targetframe = player.target = 0;
player.aimamount = 0;
}
- } else if (key == GLFW_KEY_R) {
+ } else if (key == keymap.reload) {
if (player.whichgun != grenade
&& player.reloads[player.whichgun] > 0
&& player.reloading <= 0)