Dispose of corpse prevents respawning after load
Dispose of corpse and SetDelete 1
call World::deleteObject
which sets the ref's count to 0. We don't save stats for actors with a count <= 0: https://gitlab.com/OpenMW/openmw/-/blob/master/apps/openmw/mwclass/creature.cpp#L799 https://gitlab.com/OpenMW/openmw/-/blob/master/apps/openmw/mwclass/npc.cpp#L1352 This is correct for SetDelete
d actors, but for disposed corpses it means we don't save that the death animation has finished playing. This causes respawning actors to never respawn. (Which, again, is correct for SetDelete
d actors.) Note that SetDelete
d actors that died before being deleted will respawn in Morrowind.exe.
As reported on Discord by ted https://discord.com/channels/260439894298460160/260443579908882434/1003828031518945321 with a video in which the issue is encountered when killing an ordinator wander
and reloading a save after disposal but before it should've respawned https://discord.com/channels/260439894298460160/260443579908882434/1003828041270698014
Seems to have been introduced in 0.47: https://github.com/OpenMW/openmw/pull/2715