medfall

A super great game engine
Log | Files | Refs

commit 318e8201d570346624e7cae303503a84c1817be1
parent cdee4d20a131f8d8231256cdf9d1898f8ebf49ce
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Aug 30 18:03:05 +0100

IJKL camera controls in BSP renderer

Diffstat:
bsp.cc | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/bsp.cc b/bsp.cc @@ -268,8 +268,11 @@ GAME_FRAME( game_frame ) { const int lr = input->keys[ KEY_D ] - input->keys[ KEY_A ]; const int dz = input->keys[ KEY_SPACE ] - input->keys[ KEY_LEFTSHIFT ]; - const int dpitch = input->keys[ KEY_DOWNARROW ] - input->keys[ KEY_UPARROW ]; - const int dyaw = input->keys[ KEY_LEFTARROW ] - input->keys[ KEY_RIGHTARROW ]; + int dpitch = input->keys[ KEY_DOWNARROW ] - input->keys[ KEY_UPARROW ]; + int dyaw = input->keys[ KEY_LEFTARROW ] - input->keys[ KEY_RIGHTARROW ]; + + dpitch += input->keys[ KEY_K ] - input->keys[ KEY_I ]; + dyaw += input->keys[ KEY_J ] - input->keys[ KEY_L ]; game->pitch += dpitch * dt * 100; game->yaw += dyaw * dt * 100;