src/proto2/Graphics.cc
changeset 96 4a801210096c
parent 94 08bebac3d0c2
child 108 1b93045a5b0a
equal deleted inserted replaced
95:10704e1df844 96:4a801210096c
    51      
    51      
    52     // ignore if we don't have a local player
    52     // ignore if we don't have a local player
    53     if ((player = state.getLocalPlayer()) == NULL)
    53     if ((player = state.getLocalPlayer()) == NULL)
    54         return;
    54         return;
    55     
    55     
    56     // handle up/down/left/right
    56     // handle movement
    57     if (keyboard.get_keycode(CL_KEY_UP))
       
    58             input_move |= INPUT_MOVE_UP;
       
    59 
       
    60     if (keyboard.get_keycode(CL_KEY_DOWN))
       
    61             input_move |= INPUT_MOVE_DOWN;
       
    62 
       
    63     if (keyboard.get_keycode(CL_KEY_LEFT))
    57     if (keyboard.get_keycode(CL_KEY_LEFT))
    64             input_move |= INPUT_MOVE_LEFT;
    58             input_move |= INPUT_MOVE_LEFT;
    65 
    59 
    66     if (keyboard.get_keycode(CL_KEY_RIGHT))
    60     if (keyboard.get_keycode(CL_KEY_RIGHT))
    67             input_move |= INPUT_MOVE_RIGHT;
    61             input_move |= INPUT_MOVE_RIGHT;
       
    62 
       
    63     if (keyboard.get_keycode(CL_KEY_RSHIFT))
       
    64             input_move |= INPUT_MOVE_JUMP;
    68 
    65 
    69 	if (keyboard.get_keycode(CL_KEY_I))
    66 	if (keyboard.get_keycode(CL_KEY_I))
    70 		player->debugInfo();
    67 		player->debugInfo();
    71     
    68     
    72     // apply movement if applicable
    69     // apply movement if applicable