fallout1-ce icon indicating copy to clipboard operation
fallout1-ce copied to clipboard

[linux] pressing B to change weapon infinite cycle

Open arrowgent opened this issue 2 years ago • 1 comments

at some point pressing B to change your weapon (as the F1 help menu shows) will infinite loop change weapons and you cant stop it, move, exit, or otherwise have to alt-f4 the game (or ctrl-c the terminal)

arrowgent avatar Feb 13 '23 01:02 arrowgent

The same error on win 64 build.

M1sh2 avatar Feb 13 '23 17:02 M1sh2

Any clues to reproduce it?

alexbatalov avatar Feb 14 '23 19:02 alexbatalov

Had it on android also when i had my keyboard plugged in. Not sure how to reproduce it. Happend in necropolis when seth started attacken me after a conversation and i wanted to switch weapons

NukeItAll avatar Feb 14 '23 21:02 NukeItAll

Any clues to reproduce it?

The error is very easy to reproduce if you pick up a weapon (gun) at the beginning, enter combat mode, change weapons on B or on button in menu. The character will constantly change weapons, I went through the whole game with this bug, just without changing the game through B or on the button in the menu.

M1sh2 avatar Feb 15 '23 04:02 M1sh2

The fix is on par with F2, but strictly speaking key handling code is slightly wrong in both F2CE and F1CE. Original game does not poll DirectInput for next key when keyboard is disabled, so events are accumulated in DirectInput internal buffers. In CE events are polled via SDL and filtered afterwards, so when keyboard is disabled in the middle of key-down/key-up pair of events, next key-up event is silently ignored. This leads the game to think we're still holding the key. In this case B in combat mode - it starts modal animation for switching weapons which disables game UI for a couple of seconds and then re-enables it back. Since the game thinks B is still being held, it performs switching over and over again.

alexbatalov avatar Feb 15 '23 07:02 alexbatalov

Hi, I'm still experiencing this bug. I've noticed that it seems to only occur during combat; pressing B outside of combat works as intended. I see that the issue is marked as completed and the creator mentioned a fix–I'm new to GitHub, so is there something I missed? How can I apply this fix to my game?

I'm running the app on an M1 MacBook Air. Very grateful for your work on this project so far and would love to find a way to contribute to it myself if possible.

JD-HD avatar Nov 16 '23 23:11 JD-HD