Skip to content

Commit

Permalink
Fix another case of inter-vessel joints getting created on decoupling (
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav authored May 29, 2024
1 parent 88b44c5 commit 42e84c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ private void OnVesselWasModified(Vessel v)
return;

if (!v.rootPart.started ||
v.protoVessel == null) // This handles decoupling where the parent part of the decoupler hasn't yet been updated and thus references the part on original vessel
v.protoVessel == null || // This handles decoupling where the parent part of the decoupler hasn't yet been updated and thus references the part on original vessel
v.rootPart.parent != null && v.rootPart.parent.vessel != v) // Handles a similar case as the check above
{
// Need to guard against this event getting called too early in the vessel lifecycle.
// It can take a few frames before rigidbodies and stock joints are created.
Expand Down

0 comments on commit 42e84c9

Please sign in to comment.