diff options
Diffstat (limited to 'src/GameLoop.cpp')
-rw-r--r-- | src/GameLoop.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp index 06d4e90..8a1af59 100644 --- a/src/GameLoop.cpp +++ b/src/GameLoop.cpp @@ -32,9 +32,7 @@ extern float rad2deg; extern Fog fog; extern int environment; extern int slomo; -extern int aimkey; -extern int psychicaimkey; -extern int psychickey; +extern struct Key keymap; void handleKey(Game* game, int key, int action, int mods) { @@ -81,9 +79,9 @@ void handleKey(Game* game, int key, int action, int mods) && player.reloads[player.whichgun] > 0 && player.reloading <= 0) player.ammo = -1; - } else if (key == aimkey) { + } else if (key == keymap.aim) { player.aiming ^= 1; - } else if (key == psychicaimkey) { + } else if (key == keymap.psychic_aim) { // Picking up gun from rag doll if (player.currentanimation == crouchanim && (!player.aiming || player.whichgun == nogun @@ -125,7 +123,7 @@ void handleKey(Game* game, int key, int action, int mods) alSourcef(gSourceID[shootsong], AL_PITCH, 0.5f); alSourcef(gSourceID[zombiesong], AL_PITCH, 0.5f); } - } else if (key == psychickey) { + } else if (key == keymap.psychic) { if (visions ^= 1) { game->flashamount = game->flashr = 1; game->flashg = game->flashb = 0; |