Best way to clear out entities?Solved
I'm not the one who made the fix, plus i'm not a developer so I cannot help you, but you are, can you look into this @misticos

Merged post

HIs plugin is broken, this is not solved. Please fix.
5da3548126948.png P4R4NORM4L
I'm not the one who made the fix, plus i'm not a developer so I cannot help you, but you are, can you look into this @misticos

Merged post

HIs plugin is broken, this is not solved. Please fix.

You need to get the latest version. It was fixed.

5d35f1495da0a.jpg FastBurst

You need to get the latest version. It was fixed.

To be honest i am not sure if its still works PROPERLY, so i will run tests in near time and only then release it again

5ba216a6d7f65.png Orange

To be honest i am not sure if its still works PROPERLY, so i will run tests in near time and only then release it again

So far so good, none of my players have had any complaints since using it. I have one player that tells me every single time any issue arrises and so far he hasn't said a word with the latest build you gave me. 

5b6ed4c9ac8e4.jpg misticos
This means you should fix the loot plugin instead of making a separate plugin to fix the issue caused by another plugin. Bad practice
And then you are releasing this.... https://umod.org/plugins/held-entity-fix
No comments
Is there any legitimate case where a HeldEntity won't have an Item?  I found 5000+ such objects on my server.

var orphans = UnityEngine.Object.FindObjectsOfType<HeldEntity>().Where(x => x.GetItem() == null).ToList();
Puts("Found " + orphans.Count + " orphaned HeldEntity objects.");

// [Helper Commands] Found 5781 orphaned HeldEntity objects.​

Running the same code with GetItem() != null returned 394 objects.

Check out how getItem works. Player must have it in their inventory.
What's a legitimate way to test for HeldEntitity objects that shouldn't exist?  Just trying to understand how some plugins were leaving them around.
There isn't likely a really best way, you may at least try to loop through all containers and see if any have an item with the same held entity. If no - destroy it.
Zugzwang
Is there any legitimate case where a HeldEntity won't have an Item?  I found 5000+ such objects on my server.

var orphans = UnityEngine.Object.FindObjectsOfType<HeldEntity>().Where(x => x.GetItem() == null).ToList();
Puts("Found " + orphans.Count + " orphaned HeldEntity objects.");

// [Helper Commands] Found 5781 orphaned HeldEntity objects.​

Running the same code with GetItem() != null returned 394 objects.

Wrong.

1. Get all items in all containers + corpses + other sh*t (list 1)
2. Get all held entities (list 2)
3. Loop through all items (from list 1) and remove its held entities from (list 2)
4. Now in (list 2) you have only broken held entities
5. Remove them, profit

Oh, I see you are solving a problem that I have been trying to solve for a long time)
I tweaked a couple of plugins for this and a new save.
But the held entity removal plugin I think will work even better. A good idea
5ba216a6d7f65.png Orange

1. Get all items in all containers + corpses + other sh*t (list 1)
2. Get all held entities (list 2)
3. Loop through all items (from list 1) and remove its held entities from (list 2)
4. Now in (list 2) you have only broken held entities
5. Remove them, profit

Thanks for the more detailed instructions.  I don't think this is happening on my server, but the thread is interesting so I wanted to understand the problem.  I'll give this a try just for educational purposes.

This is the kind of thing I wonder about as an amateur who is mucking around with the code.  Guy makes a plugin and it seems to work perfectly on his empty dev server.  Then the plugin gets put onto an active server and it becomes apparent that it has some unintended side effects.  Finally some more experienced programmers look at it and figure out he's leaking thousands of broken entities.

It's like when they used to put lead in the gasoline.  Seemed pretty damn amazing at first, for making the engine run smooth.  Then they found out it was causing a ton of brain damage.  Oops!

Lolll
So what plugin was the cause of all this ?
5d485c0d7001e.png?uid=5d485c56dcf2c FuelStream
So what plugin was the cause of all this ?

Any plugin where items got removed not properly

Locked automatically