Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly replicated bug with NPCs dropping their weapons #48670

Open
Salty-Panda opened this issue Apr 26, 2021 · 0 comments
Open

Possibly replicated bug with NPCs dropping their weapons #48670

Salty-Panda opened this issue Apr 26, 2021 · 0 comments
Labels
<Bug> This needs to be fixed NPC / Factions NPCs, AI, Speech, Factions, Ownership

Comments

@Salty-Panda
Copy link
Contributor

Describe the bug

As described in #45865, NPC for no visible reason drops their weapon.
It might happen both with player-owned NPCs and those belonging to other factions.
Until now, despite a few tries, I was unable to reproduce it.

Steps To Reproduce

I happened to test some unrelated changes while breakpoint related to this issue triggered.
image
I think the problem is as such:
NPC when not doing anything might attempt to try to find and equip a better weapon.
Code visits cached inventory, function returns some better weapon.
NPC puts off their current weapon (probably dropping it) and tries to wield a better one
NPC is not allowed to pick up loot, function stops.

Tomorrow, I will probably try to change a chance to trigger this check to once per minute and try to inspect reproducing this bug further.

Expected behavior

Check whether NPC can actually pick up a better item before dropping the current one

Versions and configuration

Revision 207a94d

@actual-nh actual-nh added <Bug> This needs to be fixed NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

No branches or pull requests

2 participants