ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.72k stars 624 forks source link

[HL: OP] [HL: BlueShift] Steam Controller joystick does not work properly #2867

Open jschroed opened 7 years ago

jschroed commented 7 years ago

Your system information

Please describe your issue in as much detail as possible:

When trying to use the Steam Controller left stick as a joystick in Half Life Opposing Force or Half Life Blue Shift, the controls behave oddly. The joystick works fine for the original game Half Life.

The controls are always moving backward and strafing to one side. Moving the stick forward moves forward and moving the stick backwards stops. It seems there could be an issue with the range of the stick vs. what the game expects. (E.g. the joystick range is -128 to 127 and the game expects 0 to 255.) This is not an issue in the original Half Life.

Steps for reproducing this issue:

The easiest way to see this issue is to disable one axis and just look at the other axis. I disabled the x-axis (side-to-side or turning movement) and just looked at the forward and backward movement.

  1. Disable the x-axis and update: joyadvaxisx 0 joyforwardsensitivity 1.00 joyadvancedupdate
  2. The following behavior is produced: Player is always moving backward Moving the stick forward moves the Player forward Moving the stick backward stops the Player moving
  3. Reversing the forward movement has a different effect: joyadvaxisx 0 joyforwardsensitivity -1.00 joyadvancedupdate
  4. Reversing the forward movement has this behavior: Player is always moving forward Moving the stick forward moves the Player backward Moving the stick backward stops the Player moving

Contents of joystick.cfg: joyadvanced 1 joyadvaxisx 3 joyadvaxisy 1 joyforwardsensitivity -1.00 joysidesensitivity 1.00 joyforwardthreshold 0.15 joysidethreshold 0.15 joyadvancedupdate

zeddidragon commented 2 years ago

I came across this from google as I had the same issue. For anyone else encountering the same, I bring a solution. Append this to your joystick.cfg:

    +forward
    +moveright

This makes the character permanently move in those directions with a force of exactly 1.0. Some other commands may be applicable depending on exactly which involuntary motions you suffer from:

    +forward // walk forward
    +back // walk back
    +moveleft
    +moveright
    +lookup
    +lookdown
    +left // look left
    +right // look right

If you're just starting up the game you may have to reapply those counterforces manually. To make that easier you can bind the counterforces to a shortcut:

    alias +joyoffset "+back;+moveright"

and then you can run "+joyoffset" when booting the game up. It seems to persist through loading screens. It's not a perfect solution by any means, but it should get you through the games.

jschroed commented 2 years ago

@zeddidragon, that worked for me! With you suggestion, it makes the joystick usable.

At the very least, this issue is not a major problem since there is a workaround. I agree that is not ideal because it requires editing configuration files.

I made similar changes but slightly different. I put my changes in "userconfig.cfg" instead of joystick.cfg. I used +back and +moveright like you mentioned.