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

FilthyCasual523
Posts: 64
Joined: Tue Feb 06, 2018 6:06 am

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

Post 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 2551 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 2551 times

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

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

Post 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.

FilthyCasual523
Posts: 64
Joined: Tue Feb 06, 2018 6:06 am

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

Post 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.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

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

Post 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.

User avatar
King of Worms
Posts: 4751
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

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

Post 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?

FilthyCasual523
Posts: 64
Joined: Tue Feb 06, 2018 6:06 am

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

Post by FilthyCasual523 »

I honestly can't remember. I don't believe I did.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

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

Post 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)
Attachments
SAVE126.zip
(212.52 KiB) Downloaded 71 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

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

Post 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
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

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

Post 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. :)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

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

Post by pango »

Done
I used the same style I've seen used in other places in the code
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Locked