MajorCooke / MC_Utility

A library for some of my GZDoom mods.
7 stars 3 forks source link

Weapon Keys Don't Work #2

Closed edthebat closed 5 years ago

edthebat commented 5 years ago

KEYCONF Buster allows for cycling through weapons with the 'next weapon' and 'previous weapon' commands (commonly set to the mouse wheel by many users and commercial FPS games), but the weapon slot keys (default, 1 through 0 on the top row) do not work at all.

MajorCooke commented 5 years ago

What are you testing it with? Did you make sure to load it first? And did you make sure to test this with the base alone, and NOT with yours?

edthebat commented 5 years ago

Yes, I loaded it first. Testing it with any other project that uses KEYCONF setslot, and any third project that includes weapons not defined with setslot. And yes, I tested with the base, NOT with mine. Mine did nothing to change anything except what you see in the pull request, which had nothing to do with key commands

edthebat commented 5 years ago

Have just confirmed the issue is present even if no other files are loaded. mc_utility by itself, with KEYCONF Buster turned on, will disable the weapon keys

MajorCooke commented 5 years ago

If you're testing this with standard Doom weaponry, that's because slotpriority and slotnumber are not assigned onto the weapons. Nothing can be done about that.

MajorCooke commented 5 years ago

All the weapons are assigned on the player itself. It won't work with anything that doesn't have a slot number/priority assigned. That's why I included keyconf buster toggle option.

edthebat commented 5 years ago

I've just tested with a custom weapon that does have Weapon.Slotnumber and Weapon.Slotpriority set. Weapon keys still don't work.

MajorCooke commented 5 years ago

It works fine with D4D. Give it a try there, just to make sure.

edthebat commented 5 years ago

I see the issue there, now. Combining 'unslotted' weapons with slotted ones was causing confusion.

This raises further questions, though. My pull request is intended to collect slot numbers for the weapons that don't explicitly define them, yet I still cannot use weapon keys to select them; only mousewheel. Any advice on what's still missing?

MajorCooke commented 5 years ago

Simply put, their slot numbers internally default to -1. This doesn't change when assigned by keyconf. Nor is the priority.

You must use those properties or it cannot and will not work, unless you manually maintain a list somewhere for the code to search through. To that end though you'll need to maintain every single weapon which could work as a short term solution, but the moment they change names, you have to update it each time.

Doesn't strike me as worth it honestly.

edthebat commented 5 years ago

I see. Well frankly, if scroll-wheeling is working, I'll definitely accept that as a partial solution. With the pull request I have open, I can currently sift through a player's full arsenal, plus weapons defined with setslot (if I wanted them), so I have access to all the weapons, which is the important thing.

MajorCooke commented 5 years ago

I'll take a look soon, when I get the chance. If you obliged my request with the ability to turn off that extra bits so it just does the collected, I'll be happy.

Seems like this issue is no longer one so I'm closing this.