Skip to content

Commit

Permalink
Map PDA_MOVE actions only to arrows on keyboard to allow player to move
Browse files Browse the repository at this point in the history
Initially, I mapped them to WASD also, which prevented player from movement when PDA is open.
  • Loading branch information
Xottab-DUTY committed Aug 12, 2023
1 parent 854ed03 commit 1a83879
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/xrEngine/xr_level_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,10 +1004,10 @@ class CCC_DefControls : public CCC_UnBindAll

// PDA:
{ kPDA_MAP_MOVE, { SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_UNKNOWN, XR_CONTROLLER_AXIS_RIGHT } },
{ kPDA_MAP_MOVE_LEFT, { SDL_SCANCODE_A, SDL_SCANCODE_LEFT, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_RIGHT, { SDL_SCANCODE_D, SDL_SCANCODE_RIGHT, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_UP, { SDL_SCANCODE_W, SDL_SCANCODE_UP, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_DOWN, { SDL_SCANCODE_S, SDL_SCANCODE_DOWN, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_LEFT, { SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_LEFT, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_RIGHT, { SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_RIGHT, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_UP, { SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_UP, XR_CONTROLLER_BUTTON_INVALID } },
{ kPDA_MAP_MOVE_DOWN, { SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_DOWN, XR_CONTROLLER_BUTTON_INVALID } },

{ kPDA_MAP_ZOOM_IN, { SDL_SCANCODE_Z, SDL_SCANCODE_KP_PLUS, XR_CONTROLLER_AXIS_TRIGGER_RIGHT } },
{ kPDA_MAP_ZOOM_OUT, { SDL_SCANCODE_C, SDL_SCANCODE_KP_MINUS, XR_CONTROLLER_AXIS_TRIGGER_LEFT } },
Expand Down

0 comments on commit 1a83879

Please sign in to comment.