-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 UninitializedSaveTest prototypes #16144
Conversation
private void OnCollide(EntityUid uid, LightningComponent component, ref StartCollideEvent args) | ||
{ | ||
if (!TryComp<BeamComponent>(uid, out var lightningBeam) || !TryComp<BeamComponent>(lightningBeam.VirtualBeamController, out var beamController)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this function around while making ArcTarget
nullable.
I'm not entirely sure what the function was meant to be doing, but AFAICT there was a chance it would enter an infinite loop if Arc
failed to find a target? So now it no longer does a while loop, which might change some behaviour if it fails to find a target during the first attempt.
Fixes #15940 and re-adds a check for whether uninitialized entities are writing references to other entities while serializing.
Note that I haven't actually tested most of these changes in game, I just changed the prototypes until the test was happy, but AFAIK this shouldn't cause any issues seeing as the entities were being modified on spawn anyways.