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

Dead players will regain tag "player" on rejoin #2293

Open
mugg91 opened this issue Jan 4, 2025 · 2 comments · May be fixed by #2295
Open

Dead players will regain tag "player" on rejoin #2293

mugg91 opened this issue Jan 4, 2025 · 2 comments · May be fixed by #2295
Labels
bug An *objective* unintended feature/mechanic that should be fixed engine bug A bug that requires changes to the KAG engine to fix

Comments

@mugg91
Copy link
Contributor

mugg91 commented Jan 4, 2025

Description

When rejoining, player corpses will regain the "player" tag, causing these bugs:

When the player corpse is put into a crate, the crate will show a "get out" button instead of the normal inventory button.

When the player corpse is overlapping with a flag of the same team, it will trigger fast returning, depleting the flag's return meter faster.

When the player corpse collides with Princess, makes a kiss sound.

When the player corpse collides with a migrant in TTH, makes "friend" sound (if friendly) or "no" sound (if not friendly).

Player corpse will fall through trap blocks.

@mugg91
Copy link
Contributor Author

mugg91 commented Jan 4, 2025

Character death untags "player", and tags "dead" and "dead player".
When rejoining, the dead character will somehow have regained the "player" tag, but still also have "dead" and "dead player".
The check in Crate.as getPlayerInside() can be changed accordingly.

There will be a normal inventory button, but it will not present an inventory for some strange reason,
even though isInventoryAccessible() returns true and GetButtonsFor() doesn't interfere in any way,
as long as the dead character is inside.

Maybe the inventory button (which is handled engine side) has some additional failsafes that disables the inventory if it thinks an alive player is inside?

@mugg91
Copy link
Contributor Author

mugg91 commented Jan 4, 2025

I figured it out just after my previous post.
It looks like I was right. When the character doesn't have the "player" tag, the inventory can be accessed.

It requires changing

this.tag("player")

to

	if (!this.hasTag("dead"))
		this.Tag("player");

in all runner blob init functions.
I will fix it soon.

@mugg91 mugg91 changed the title Wrong "get out" button on crate after rejoining Dead players will regain tag "player" on rejoin Jan 4, 2025
@Vam-Jam Vam-Jam added bug An *objective* unintended feature/mechanic that should be fixed engine bug A bug that requires changes to the KAG engine to fix labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An *objective* unintended feature/mechanic that should be fixed engine bug A bug that requires changes to the KAG engine to fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants