Removal of weapon attachments when upgrading weapons
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 536
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 3
Description
This is more of an issue to discuss a behavior in the game and make note of it for future reference if it does successfully be determined as a bug and does get fixed someday. This isn't a demand from someone with no skin in the game yet to expect to be fixed straight away.
Describe the bug
When upgrading weapons, after an upgrade has been applied, all weapon attachments are removed from the weapon and placed in the inventory. The player must then manually reattach the removed attachments. This behavior has been observed in COP, COP with OpenXRay and Anomaly. Behavior in CS and CS with OpenXRay is currently untested but is a safe assumption that it exists there as well.
The bug also occurs regardless if the weapon being upgraded is currently equipped in an equipment slot, or if it resides in the player's inventory.
To Reproduce
Steps to reproduce the behavior:
- Posses an upgradable weapon with attachments attached onto it. A scope and suppressor on an assault rifle for example.
- Upgrade the weapon through a technician
- Notice the attachments are removed and placed in the inventory
Expected behavior
Attachments remain attached to the weapon they have been attached to after the upgrade has been completed.
Desktop (please complete the following information):
- OS: Windows 10
- OpenXRay
Additional context
This is one of those things in the game that can be lived with but seem counter intuitive and present only a minor annoyance to the grand experience of the games for the player so is more of a low hanging fruit that improves the user experience.
However if the player has attached an attachment to the weapon, the game should respect the players decision to have attached the attachment. For ("Rolplaying") sake, if the upgrades required the removal of the attachments to perform the upgrade, the technician would then reattach the attachments after they have completed their task.
In the end, this change also respects OpenXRay's direction to remain as vanilla as possible as well as something that wouldn't need to be optionally selected by the player.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with an upgradable weapon carrying a scope and suppressor, then trace the technician's weapon-upgrade flow and how attachments are moved to inventory. Done means attachments remain on the upgraded weapon, whether it is equipped or in the player's inventory, without changing the vanilla behavior described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100