Page 1 of 2

Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Tue Sep 11, 2018 3:11 am
by FilthyCasual523
Not sure if this is a bug or not, but on my test character (imported from Classic) I came across this weird little oddity...

Not sure if you can see it clearly in the screenshot, but there's a skeleton corpse floating up there in the air to the southeast of the cemetery in Penbrugh.
20180910230708_1.jpg
20180910230708_1.jpg (213.33 KiB) Viewed 2555 times
Here's the location, I tried to get it exact on the map. Arrow is me standing directly underneath it.
20180910230842_1.jpg
20180910230842_1.jpg (422.27 KiB) Viewed 2555 times

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh?

Posted: Tue Sep 11, 2018 5:33 am
by Interkarma
That's a new one. The corpse is almost certain left-over from somewhere else and not cleaned out of the scene correctly. I'm just not sure what conditions could have caused that yet.

Would you be able to provide a save game at the spot in your second screenshot with the error still present? Thank you.

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh?

Posted: Sun Sep 16, 2018 12:43 pm
by FilthyCasual523
Yeah, I'll get on that for you. Where are the save games located again?

EDIT: Sorry about my derpiness when it comes to this... I forgot that I'd fast-travelled away in that save, I just fast-travelled back to Penbrugh and went to the spot and the skele-corpse was no longer there. Weird.

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh?

Posted: Wed Oct 17, 2018 10:57 pm
by Interkarma
There was some fixes to scene cleanup in recent versions that likely contributed to this. I'll mark as resolved for now as it can't be reproduced easily and is possibly already fixed.

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Wed Oct 17, 2018 11:07 pm
by King of Worms
Hmm, I saw those as well. They appeared when I was resting outside, than my rest was interrupted cca 4 times during the night and I used "killall" commands immediately (like in RL :P )

Filthy, did u use "Killall" command as well before the skeleton appeared?

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Thu Nov 01, 2018 12:50 am
by FilthyCasual523
I honestly can't remember. I don't believe I did.

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Sat Dec 08, 2018 2:27 pm
by pango
Traveling in the Alik'R desert with Tedious Travel, I have been interrupted by an unexpected Orc Warlord that I immediately pacified using my mastery of orc language.
Passing by him, I resumed my journey east until I met another Orc Warlord a bit above the ground. He landed as I approached, but was pacific already (no "you pacified an Orc Warlord using orc skill" message this time).
I passed by that second one, until I got interrupted by an Orc Warlord in the sky, that wouldn't come down.
Moving on, I was interrupted by an Orc Warlord in the sky...

Ok, that was the last one; but it seems this scene cleaning issue is still, or again, present.

I'm using several mods, including Distant Terrain 2.4.2, I wonder if modding could interfere with terrain cleanup in some way; Because I never managed to reproduce that issue without mods (but it could just be that it changes timing, or that I got lucky)

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Sat Dec 08, 2018 3:42 pm
by pango

Code: Select all

            for (int i = 0; i < looseObjectsList.Count; i++)
            {
                if (!IsInRange(looseObjectsList[i].mapPixelX, looseObjectsList[i].mapPixelY) || collectAll)
                {
                    if (looseObjectsList[i].gameObject != null)
                    {
                        looseObjectsList[i].gameObject.SetActive(false);
                        StartCoroutine(DestroyGameObjectIterative(looseObjectsList[i].gameObject));
                    }
                    looseObjectsList.RemoveAt(i);
                }
            }
Is it safe to use RemoveAt(i) on a list while scanning it?
If they're two consecutive loose objects to collect, that will skip the second one because RemoveAt() shifts all items above

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Sat Dec 08, 2018 3:55 pm
by Hazelnut
Does seem to me like when an entry is removed the next one doesn't get checked and is skipped with that code. Well spotted.

Either the iteration for loop should be reversed so re-indexing on element removal only affects indexes of elements already checked, or the removeAll() method should be used with a predicate. Feel free to submit a PR mate. :)

Re: Build #0.5.505: Weird floating skele-corpse in Penbrugh? [RESOLVED]

Posted: Sat Dec 08, 2018 4:06 pm
by pango
Done
I used the same style I've seen used in other places in the code