cmss13-devs / cmss13

Contains the code for CM-SS13
https://cm-ss13.com
GNU Affero General Public License v3.0
104 stars 571 forks source link

Shift-E (draw secondary weapon bind) is inconsistent when using pyro backpack #3704

Open gitbirb opened 1 year ago

gitbirb commented 1 year ago

Testmerges

N/A

Description of the bug

Shift-E does not consistently draw your second weapon if the weapon is stored inside of a pyro backpack.

What's the difference with what should have happened?

This bind should not need weird workarounds to make sure it works, when used with certain weapon storage items.

How do we reproduce this bug?

  1. Get pyro specialist kit
  2. Put on pyro backpack and armor
  3. Put flamer in pyro backpack using holster bind (in this case, E)
  4. Grab a weapon from vendor and put it on your armor slot
  5. Press Shift-E (secondary holster bind)
  6. It draws your armor slot weapon, when it should draw your secondary weapon (the one on the back slot, inside of the pyro backpack) ... //

There is a workaround to this, where you have to manually draw and holster the flamer (clicking the backpack), as opposed to holster it with a bind. After this, for some reason it works until you take the backpack off I believe.

My reproduction steps might not work also. I just remember this happening every single time I played pyro, and I noticed it during prep quite a lot. I'm not sure exactly what causes it.

Issue Bingo

Wintermote commented 1 year ago

This is a problem with the entire holster/unholster and equip/unequip framework. Lots of edge cases that have to be individually patched up like this.

It's an issue also with GA8 and general pouches absorbing tools, equipment, and ammo with higher priority than your backpack, armor, and webbing.

Fact is, if I take a thing out of a storage object, and then press e to put it back, I want it to go back to where it came from, not some random pouch unless there's no other option.

And in this case with weapons it feels the same. It's very inconsistent, some weapons I want to be E primary, and Shift E secondary, and Shift R tertiary, but they get scrambled up and I have no actual control over it.

This is ALSO a problem with attachments where pressing the 'use attachment' hotkey will open a menu for multiple attachments and you don't have any choice about the list order (and so you cannot press F, then immediately press Space to use the most important and time-sensitive attachment in the list)

The fix for these issues is to give players some agency back. I think perhaps an equip order list? For example: The first weapon you equip into a storage slot gets E; the second weapon you equip gets Shift E; and Shift R is always your knife

Likewise with attachments, the first usable attachment attached to the gun goes to the top of the use attachment menu, the second usable attachment attached goes to the second spot, etc.

This way a player can choose what they want to be their secondary weapon, their primary attachment, etc.