Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more gamepad binds to Heretic and Hexen #1666 - Dpad not being recognized #1672

Open
Crazy-bat11 opened this issue Feb 21, 2024 · 6 comments

Comments

@Crazy-bat11
Copy link

Background

Version of Chocolate Doom: latest git version

Operating System and version: Linux Mint 21.2 Cinnamon

Game: Doom/Heretic/Hexen/Strife
Joystick: Thrustmaster Dual Analog 4

Bug description

Observed behavior: I cannot bind the Dpad to any movement or action. This behavior is observed in the setups of Doom. Heretic, Hexen and Strife.

@mikeday0
Copy link
Contributor

Quick question: Do you know what version of SDL2 you have?

@mikeday0
Copy link
Contributor

mikeday0 commented Feb 21, 2024

Also were you starting with an old configuration? If so, please open the setup utility > Configure Gamepad/Joystick, press enter on Controller, then press a button on the controller. This will refresh the configuration to use the updated game controller interface.

@Crazy-bat11
Copy link
Author

Hi, firstly I would like to thank you for implementing this new code.
My SDL2 version is 2.0.20. But, you are right. I was using an old configuration, After refreshing, the new config appeared and the Dpad is recognized (I can bind it to any action). Thank you for your help.

Do you intend to implement a "more controls' option in Strife setup too? And speaking of Strife, when you are talking to a npc, the fire button is also used to select a dialogue line. This makes you involuntarily attack the npc.

@ceski-1
Copy link
Contributor

ceski-1 commented Feb 21, 2024

And speaking of Strife, when you are talking to a npc, the fire button is also used to select a dialogue line. This makes you involuntarily attack the npc.

This is vanilla behavior unfortunately. The original game has an awful hack to work around this for mouse input (mouse_fire_countdown) but nothing for gamepad input. Even with the mouse hack, it's still possible to accidentally attack NPCs if the button is pressed fast enough.

Here's the relevant section of code:

// villsa [STRIFE]: Moved mousebuttons[mousebfire] to below
if (gamekeydown[key_fire] || joybuttons[joybfire])
cmd->buttons |= BT_ATTACK;
// villsa [STRIFE]
if(mousebuttons[mousebfire])
{
if(mouse_fire_countdown <= 0)
cmd->buttons |= BT_ATTACK;
else
--mouse_fire_countdown;
}

And here's a discussion of the mouse hack when I was dealing with it for Crispy Strife: fabiangreffrath#1014

I'm not sure how that can be fixed while also preserving the Chocolate philosophy. And if the mouse hack is copied over, then it makes gamepad attacks have the same delay bug outside of NPC dialogue. Maybe others here can suggest something.

@mikeday0
Copy link
Contributor

Hi, firstly I would like to thank you for implementing this new code. My SDL2 version is 2.0.20. But, you are right. I was using an old configuration, After refreshing, the new config appeared and the Dpad is recognized (I can bind it to any action). Thank you for your help.

Do you intend to implement a "more controls' option in Strife setup too? And speaking of Strife, when you are talking to a npc, the fire button is also used to select a dialogue line. This makes you involuntarily attack the npc.

No problem! Glad to hear the issue was resolved.

As for Strife, I do plan to expand the gamepad/joystick binds. I am somewhat lacking the confidence to do so at the moment as I am not as familiar with the game compared to Doom, Heretic and Hexen.

@fabiangreffrath
Copy link
Member

So, can this get closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants