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

Hearing - Optimise explosion event handler #10405

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

johnb432
Copy link
Contributor

When merged this pull request will:

  • (_projectile getShotInfo 5) != (netId _projectile == "0:0"). They are independent of each other and I believe the former is not suited for our use case.
  • Optimised EH slightly.

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@johnb432 johnb432 added the kind/optimization Release Notes: **IMPROVED:** label Oct 13, 2024
@johnb432 johnb432 added this to the 3.18.2 milestone Oct 13, 2024
@LinkIsGrim
Copy link
Contributor

(_projectile getShotInfo 5) != (netId _projectile == "0:0"). They are independent of each other and I believe the former is not suited for our use case.

ELI5?

@johnb432
Copy link
Contributor Author

ELI5?

In an ideal world, we'd like to have all explosions be caught by local explode event handlers.
Unfortunately, there are some exceptions, such as rockets, which only raise the projectile explosion EH where the projectile is local. Therefore, we need to implement our own system of globally informing machines that an explosion occured.

We need to filter out local-only objects from being passed globally, to avoid RPT spam (non-network ref stuff). _projectile getShotInfo 5 seems to indicate if it's used in damage events, which isn't quite what we need. netId returning 0:0 on any object means that the object exists on the local machine only.

@LinkIsGrim LinkIsGrim merged commit e357640 into master Oct 15, 2024
3 of 4 checks passed
@LinkIsGrim LinkIsGrim deleted the hearing-update-explosion-EH branch October 15, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/optimization Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants