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

[fixed] dead characters don't regain tag "player" on rejoin #2295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Jan 4, 2025

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

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 because onInit(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

	if (this.hasTag("dead"))
		this.Untag("player");

to onInit() in RunnerDeath.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.

@mugg91 mugg91 changed the title [fixed] characters don't regain tag "player" on rejoin [fixed] dead characters don't regain tag "player" on rejoin Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dead players will regain tag "player" on rejoin
1 participant