Fast forwarding can move NPC inside objects
When arriving in Maar Gan and resting NPC will get stuck in the same place.
No mods, winx64.
#8 Updated by Andrei Kortunov 3 months ago
Take a look at attached screenshot.
For AiWander we move NPC to random pathgrid and add XY-offset to prevent overcrowding:
dest.mX += OffsetToPreventOvercrowding(); dest.mY += OffsetToPreventOvercrowding();
Since we do not adjust Z position, NPC can be placed in the air or underground. In some cases such behaviour can cause NPC death (as with Habasi - bug #3735).
#11 Updated by Andrei Kortunov 3 months ago
I just checked an original game.
A test case: Ald-Ruhn, rest with tai (AI disabled).
Result: all wandering NPCs are placed exactly in pathgrids.
Note: I am not sure what happens if pathgrid is underground. I guess in this case Morrowind places wandering actor on the ground (terrain), as with SetPos function.
IMO "move wandering NPC to any unoccupied allowed pathgrid, or leave NPC in place if there are no such ones" behaviour will be enough.