Duke4.net Forums: Randomly Being Unable to Switch Weapons - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Randomly Being Unable to Switch Weapons

User is online   Ninety-Six 

#1

Title. This one keeps happening but I have not been able to identify what circumstances trigger it. No matter what I do, scroll wheel, next weapon key, weapon slot buttons, literally nothing will let me switch weapons, and the only thing that works is completely restarting eduke.

I'd post the log but there is nothing in there at the time of occurrence.
0

User is online   Danukem 

  • Duke Plus Developer

#2

It might be unrelated, but I've had a similar problem in AA which I have been assuming is a problem in my weapon code. If it happens while on the pistol weapon, firing the pistol and triggering the reload animation restores normality. It's like the game thinks that the player is reloading, allows firing but not any kind of weapon switching.

Again, that might be my own code and it might be unrelated but when it happens it's just like you describe.
0

User is online   Ninety-Six 

#3

View PostTrooper Dan, on 15 April 2020 - 07:35 PM, said:

It might be unrelated, but I've had a similar problem in AA which I have been assuming is a problem in my weapon code. If it happens while on the pistol weapon, firing the pistol and triggering the reload animation restores normality. It's like the game thinks that the player is reloading, allows firing but not any kind of weapon switching.

Again, that might be my own code and it might be unrelated but when it happens it's just like you describe.


Well the most recent one did occur on the pistol.

However, it has also happened with the chaingun (several times) and the pipebombs. I think it also happened on the RPG once as well.


EDIT: Then again I guess it's not impossible that the reload code is somehow being triggered on the other weapons and then the game just doesn't know what to do.

This post has been edited by Ninety-Six: 15 April 2020 - 07:40 PM

0

User is online   Ninety-Six 

#4

After days of testing, I got the bug to occur again (because of course the minute I start wanting it it gets shy), and even on the debug version nothing appears in the log.

That being said I know some consistent points among the occurrences. It always happens when I'm holding Rshift (run). I used to think firing was a component but I got it to trigger after picking up a box of pipebombs on this most recent, well after I had finished a battle.

This makes me wonder if it's not related to the recent shift+KPX problems I've noted.
0

User is online   Ninety-Six 

#5

Alright, I'm getting fairly convinced that this is actually something that can only happen on the standard build rather than the debug build, and the case I found on the debug was just coincidental.

I've also figured something out. Turns out there is a way to switch weapons, and that's to switch to one of the guns on the cardinal directions of the keypad (4,6,8,2). I'm almost certain this is related to the other KPX problems now.
0

User is online   Ninety-Six 

#6

Scratch that. Just got stuck with the pistol despite having ammo for other weapons, including the cardinals. I tried emptying the clip to force a reload like Dan said, but that didn't work either.

Unfortunately, this again only happened on the standard build, and not the debug. I think this being a standard-only error is the only accurate part. The rest appear to be unrelated bugs.
0

User is online   Danukem 

  • Duke Plus Developer

#7

View PostNinety-Six, on 25 April 2020 - 02:09 PM, said:

Scratch that. Just got stuck with the pistol despite having ammo for other weapons, including the cardinals. I tried emptying the clip to force a reload like Dan said, but that didn't work either.

Unfortunately, this again only happened on the standard build, and not the debug. I think this being a standard-only error is the only accurate part. The rest appear to be unrelated bugs.


So you emptied the clip, the pistol reloaded, and you were still stuck with it? Just to be clear: it's not just the numbered keys that can't switch weapons, it's also the next and previous weapon keys, right?

The debug/normal build thing is interesting.
0

User is online   Ninety-Six 

#8

View PostTrooper Dan, on 25 April 2020 - 03:03 PM, said:

So you emptied the clip, the pistol reloaded, and you were still stuck with it? Just to be clear: it's not just the numbered keys that can't switch weapons, it's also the next and previous weapon keys, right?

The debug/normal build thing is interesting.

Affirmative on all fronts. Next/previous weapon keys, next/previous weapon on the scrollwheel, weapon slot keys for the normal 1-0 keys, keypad slot keys for the guns... literally nothing will change guns.

I have been trying for about a week now to get the bug to happen on the debug build, and the closest I get is the guns get stuck for a couple of seconds. And there is still nothing in the log.

But on the normal build, it never unstucks unless I reload an older save or restart eduke entirely. And it happens rather frequently, too.


Next time it happens, I'll try to save the game. See if it's a state that will be kept. Admittedly, I kind of doubt it because I think one of the first times this occurred, I went for the reset after saving, but I can't remember clearly and I wasn't doing it intentionally.

If it does save, maybe one of the eduke maintainers can take a look at it. I'm assuming I'll have to send the folder and cons with it, but we'll figure that out if and when we cross that bridge I guess.

This post has been edited by Ninety-Six: 25 April 2020 - 03:12 PM

0

#9

Is this problem still present?
0

User is online   Ninety-Six 

#10

View PostDoom64hunter, on 09 June 2020 - 06:22 AM, said:

Is this problem still present?

For the time being I'm going to be unable to test that, unfortunately. My temporary setup died too, so I'm on an even more temporary setup now. I don't have much room to install eduke on here.
0

User is online   Ninety-Six 

#11

Alright so now that I'm on a new setup and I've had enough time to play around, it seems like it hasn't happened so far. I've gone through a few dozen levels with no issues.

There were a few moments that were a bit strange, but they're in the gray zone where I can't tell if it was caused by a bug or if I just fumbled the controls. Either way they didn't last nearly as long as the bug I initially reported here.
0

User is online   Ninety-Six 

#12

Alright it definitely happened again. It wasn't permanent, thankfully, but the bug still exists. That being said, I am on an older version so I'm going to update and once again keep watch to see if it happens another time.
0

User is online   Ninety-Six 

#13

View PostNinety-Six, on 13 September 2020 - 07:39 AM, said:

Alright it definitely happened again. It wasn't permanent, thankfully, but the bug still exists. That being said, I am on an older version so I'm going to update and once again keep watch to see if it happens another time.

9269, still persists.
0

User is online   Ninety-Six 

#14

Alright so I think this issue is absolutely related to the Shift+KPX problem noted above. When it happens I've found that doing something to the same weapon key gets them unstuck, at least in the current form. I'm not sure what it is because it's not just pressing the button again, with or without shift.
0

#15

Can you post your settings.cfg file? I feel like you have a very particular keybind scheme that triggers this.
0

User is online   Ninety-Six 

#16

Here you go:

Spoiler

0

#17

After review, the reason for this is very obvious actually.

You use the keypad keys for switching weapons (this is what I wasn't sure about), and the right Shift key for running.
By holding Shift (right or left), you override numlock (which is normally on when you start your computer) and pressing KP2, KP4, KP6 and KP8 while holding Shift will generate inputs for the arrow keys instead.
This is why you sometimes cannot switch weapons, specifically you will not be able to select the Pistol (2), Chaingun (4), Pipebomb (6) or the Devastator (8) while running, as you correctly observed.

If you disable numlock, then you will not be able to use the numpad keys, and the arrow keys will always be active, regardless of whether you press Shift or not.

This is not a bug, this is how the numpad keys are supposed to work. As this was not always the case inside eduke32 however, my suspicion is that a recent SDL update introduced support for this behavior.

There is one buggy aspect about this however. If you hold Shift, press KP4 for instance, and then let go of Shift, the Left Arrow key will get stuck and is pressed indefinitely, until you press the same arrow key again.
The inverse can also happen. If you first press KP4 (thus switching to the chaingun in your case) then press Shift, the KP4 key will become stuck. And this is exactly what prevented you from switching weapons with any key -- the game continuously triggered Weapon Key 4, until you pressed 4 again manually.

Edit: I actually analyzed this 5 months ago already: https://voidpoint.io...e32/-/issues/13

This post has been edited by Doom64hunter: 07 November 2020 - 05:20 AM

0

User is online   Ninety-Six 

#18

even years later on a completely different machine SDL still somehow manages to screw me over


This is a pretty big problem for me, actually. I don't exactly have the luxury of changing my control scheme; I need this exact setup for the sake of my bad wrists.
0

User is online   Danukem 

  • Duke Plus Developer

#19

Why not just use CAPSLOCK as a run toggle and run all the time?
0

User is online   Ninety-Six 

#20

Finer control, mostly. I tend to have manual running in pretty much all of these older FPSes, but in Duke especially where you're constantly going between wide open areas and more cramped locations, I prefer having walk as the default (since the majority of the game is set in those more cramped locations. Same story for Doom 1, but I keep the same control for the other Classic Doom games just so I don't have to keep going back and forth between control styles for what is essentially the same game). Even moreso when it comes to platforming so I can line up the jumps a lot easier.

In short I value precision over going quick. It's more difficult (but I would never say impossible) to be as precise when going as fast as Duke and other FPS protags tend to go. I prefer to use the speed when I need it and not when I don't. Otherwise I start to feel a bit slippery.

Granted I suppose I could try changing the toggle to RShift; that's not something that ever occurred to me until just now to be completely honest. Of course I'll be fighting 20 years of muscle memory at this point, too, but it could be worse. At least it would still be related to the run function. I could be trying to undo RMB as Jump, which is something that started with this very game since secondary fire was not a thing at the time (that said, I think having jump as RMB is not a bad option at all; especially in games like Duke where there's a fair bit of platforming involved. This is even more true with my wrists where WASD is pretty much impossible and there aren't really that many great alternatives in the cursor key area. I use delete, end, and page down as game-sensitive hotkeys, and for Duke I deem the ability to turn on night vision and the jetpack way more important, as well as the map).

This post has been edited by Ninety-Six: 07 November 2020 - 11:52 PM

0

User is online   Ninety-Six 

#21

Is there truly no other way around this? I've been using RShift as a run toggle instead, and while it's generally workable in most cases, in some situations I find the slightly slower triggering time to be a problem. Particularly with in regards to platforming; it makes landing on smaller targets much more difficult without as direct access as simply pressing or removing my finger versus a full press for each switch.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options