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

fix(RequireProjectileTargetSystem): Add ent invalid check. #30015

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CaasGit
Copy link
Contributor

@CaasGit CaasGit commented Jul 13, 2024

About the PR

A situation can happen where shooter.value references entity 0. Check for that and treat it like it's null.

A situation can happen where shooter.value references entity 0. Check
for that and treat it like it's null.
@CaasGit CaasGit requested a review from DrSmugleaf as a code owner July 13, 2024 19:27
@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label Jul 13, 2024
Comment on lines 31 to 35
{
// Prevents shooting out of while inside of crates
var shooter = projectile.Shooter;
if (!shooter.HasValue)
if (!shooter.HasValue || shooter.Value == EntityUid.Invalid)
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this entityid is invalid?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a repo for this and it was on live. I assume the HasValue was intended to be checked for EntityUid.Invalid as well. This code is new within the last month or so. If you have ideas on how to debug live running games let me know, ideally with a debugger.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not even sure if shooter can even be false for HasValue since Invalid is a Value.

@SlamBamActionman SlamBamActionman added the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Nov 14, 2024
@eoineoineoin eoineoineoin added T: Bugfix Type: Bugs and/or bugfixes P3: Standard Priority: Default priority for repository items. D2: Medium Difficulty: A good amount of codebase knowledge required. A: Core Tech Area: Underlying core tech for the game and the Github repository. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Core Tech Area: Underlying core tech for the game and the Github repository. D2: Medium Difficulty: A good amount of codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Needs Review Status: Requires additional reviews before being fully accepted T: Bugfix Type: Bugs and/or bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants