Xbox Controller support for Enemy Territory - Wolfenstein

  • 2 heads
  • 1 release
  • git clone https://klva.cz/src/etwolf/gamepad.git
  • Some stuff done in README. 255732a, 10 Apr 2022
    detours/
    .gitignore
    .gitmodules
    CMakeLists.txt
    common.h
    game.c
    game.h
    gamepad.c
    gamepad.h
    hook.c
    hook.h
    keycodes.h
    libgamepad @ b814961
    README.md

    Xbox Controller support for Enemy Territory

    This library introduces Xbox gamepad support for Wolfenstein - Enemy Territory.

    While you can somewhat emulate mouse movements using the right stick, left stick is only reduced to an 8-direction control. This tool makes it possible to run at pretty much any speed, and it automatically toggles +speed (which in fact means slow walk mode) and optionally +sprint, so you can take advantage of the analog input.

    Compatibility

    In theory, this should be compatible with any other mod.

    Usage

    1. Start the game.
    2. Inject the library.
    3. Go find out why controllers are inferior input devices for FPS.

    Configuration

    set sensitivity 5
    set m_pitch     0.022         // you can set these to negative values to invert axis
    set m_yaw       0.022
    
    set gp_deadzone ".1 .1 .1 .1"
    //                \   \  \  \
    //                 \   \  \  right trigger DZ
    //                  \   \  left trigger DZ
    //                   \   right stick DZ
    //                    left stick DZ
    
    set gp_sprint 1.0   // Threshold for auto-sprint (>0.0 - 1.0), 0 to disable.
    set gp_run    0.7   // Threshold for auto-run, 0 to disable.
    set gp_accel  1.5   // Exponential turn speed acceleration multiplier, 0 to disable.
    
    set in_joystick 0   // keep this at zero!
    
    bind JOY1  "weapnext"          // DPAD UP
    bind JOY2  "weapprev"          // DPAD DOWN
    bind JOY3  "kill; forcetapout" // DPAD LEFT
    bind JOY4  ""                  // DPAD RIGHT
    bind JOY5  "+scores"           // START
    bind JOY6  ""                  // BACK
    bind JOY7  ""                  // THUMB LEFT
    bind JOY8  "+reload"           // THUMB RIGHT
    bind JOY9  "+movedown"         // SHOULDER LEFT
    bind JOY10 "+moveup"           // SHOULDER RIGHT
    bind JOY13 ""                  // A
    bind JOY14 "weapalt"           // B
    bind JOY15 "+activate"         // X
    bind JOY16 "+prone"            // Y
    
    bind MOUSE1 "+attack"          // TRIGGER RIGHT
    bind MOUSE2 "+vstr ads1 ads0"  // TRIGGER LEFT
    
    set ads1 "cg_fov 90; sensitivity 2; gp_accel 1.2"
    set ads0 "cg_fov 119; sensitivity 3; gp_accel 1.7"