Jump to content

Some dropped items remain floating in the air after the ship despawns.

Pending 2.4.6

Kobani
Kobani

Posted

Some dropped items remain floating in the air after the ship despawns. Could you please check what is causing this and fix it?

image.png

image.png

image.png

  • Like 1
aimacak

Posted

Hello, its already in roadmap.
If you want you can using my fix before official release.

find this method in HarborEvent.cs

private void OnDestroy()

and change this:

if (Cargo.IsExists()) Cargo.Kill();



to this:
 

				if (Cargo.IsExists())
				{
					List<BaseEntity> children = new List<BaseEntity>(Cargo.children);

					foreach (BaseEntity child in children)
					{
						if (!child.IsExists()) continue;

						if (child is BasePlayer || child is PlayerCorpse)
						{
							child.SetParent(null, true, true);
						}
						else if (child is DroppedItemContainer container)
						{
							Rigidbody rb = container.GetComponent<Rigidbody>();
							if (rb != null)
							{
								rb.isKinematic = false;
								rb.useGravity = true;
								rb.WakeUp();
							}
							child.SetParent(null, true, true);
						}
						else if (child is DroppedItem droppedItem)
						{
							droppedItem.SendMessage("BecomeActive", SendMessageOptions.DontRequireReceiver);
							droppedItem.SetParent(null, true, true);
						}
					}
					Cargo.Kill();
				}

 

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.1m
Total downloads
Customers
12.1k
Customers served
Files Sold
171.7k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.