Client: Don't allow dropping items while dead #15737
Open
+3
−1
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.
Should fix #15728 in ~95%? of cases, effectively going back to the previous state (where the formspec prevented this), and should be something we definitely want to do, no matter whether we fix it fully in the future.
There might technically still be a possible race condition if items are dropped in the very moment the player dies, but that should be relatively unlikely to happen.
Ideally we would also want to disable other controls, but as it turns out that requires different changes in different places and I don't want to pollute this trivial PR.
How to test
As described in the issue. Observe that you simply can't drop things while dead anymore.