[fixed] dead characters don't regain tag "player" on rejoin #2295
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.
Status
Description
Fixes #2293
For a character that dies,
"player"
gets untagged, and"dead"
and"dead player"
get tagged.But when rejoining, the dead player will get
"player"
tag back becauseonInit(CBlob@ this)
gets run for every character on rejoin which applies the tag. This causes a bug where a crate that has a dead character inside will - after rejoining - show a "get out" button instead of the normal inventory button.I added
to
onInit()
inRunnerDeath.as
.Because
RunnerDeath.as
is at the bottom in the blob scripts list for all the runners, this code effectively removes the "player" tag on rejoin. This is the simplest solution. Alternatively, you could also not tag "player" if tag "dead" is present, in each runner's blob init function.Tested on dedicated server, it works and the crate bug doesn't happen anymore.
I think there could be more bugs like this in the game. I will search for more.