Merged post
HIs plugin is broken, this is not solved. Please fix.
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.
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
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.
And then you are releasing this.... https://umod.org/plugins/held-entity-fixmisticos
This means you should fix the loot plugin instead of making a separate plugin to fix the issue caused by another plugin. Bad practice
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.
ZugzwangIs 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
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!
FuelStream
So what plugin was the cause of all this ?
Any plugin where items got removed not properly