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

Correctly notify addons when a player has died #100

Open
BytewaveMLP opened this issue Aug 24, 2021 · 0 comments
Open

Correctly notify addons when a player has died #100

BytewaveMLP opened this issue Aug 24, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@BytewaveMLP
Copy link
Collaborator

Currently, GMAU provides no way to notify addons if a player has died/been reported dead. This means that addons such as PointShop for example have no way of knowing when to destroy trails for "dead" players, as it relies on the PlayerDeath hook to know when to destroy the trail. There are a couple potential solutions here:

  • Call PlayerDeath, and provide an override for Player:IsAlive. This is the most standard way to handle a player's death, but it would also mean invoking default death behavior from the game as well, which we would need to suppress; we don't want to notify other players of a dead player before their body is found or anything like that.
  • Add our own hook, GMAU PlayerDead (SH), which fires on the server when a player is killed, and on the client when a body is marked dead (optional, maybe this should be a separate hook). This means addons need to explicitly listen for this nonstandard hook, but allows us more control over default behavior.
@BytewaveMLP BytewaveMLP added the enhancement New feature or request label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant