Fix floating guns around players #1394
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There was an issue where players would appear to have weapons like pistols or grenades floating around them, as reported in #1274 For this particular report with the demo replay, this turned out to be a case where we were rendering the weapons of the player spectating the living player, and for whatever reason that spectator still had items in their inventory, and those items were then rendered hovering/flying around the world at the spectator's position.
This PR addresses the bug by preventing dead players from "bumping" weapons, and should they still for whatever reason have a weapon, prevents that weapon from being drawn in the world.
Steps to reproduce
v17.0-alphato have a build compatible with the demodemoui, or hotkey Shift+F22000033000or soWhat happens
What should happen with this patch applied
Toolchain
Linked Issues