Project

General

Profile

Bug #3638

Fast forwarding can move NPC inside objects

Added by Miroslav Gavrilović 10 months ago. Updated 9 days ago.

Status:
In Progress
Priority:
Normal
Category:
AI
Target version:
Start date:
11/25/2016
% Done:

0%

Reproducibility:
Sometimes
Operating system:
Other
Severity:
Normal

Description

When arriving in Maar Gan and resting NPC will get stuck in the same place.
No mods, winx64.

photo1.png View (2.33 MB) Miroslav Gavrilović, 11/25/2016 11:17 PM

photo2.png View (2.23 MB) Miroslav Gavrilović, 11/25/2016 11:17 PM

Pathgrid.jpg View (988 KB) Andrei Kortunov, 08/23/2017 02:16 PM


Related issues

Duplicated by OpenMW - Bug #3735: Sugar-Lips Habasi fell though the floor and vanished. Rejected 01/19/2017
Duplicated by OpenMW - Bug #3852: Sugar-Lips Habasi dropping dead Rejected 05/01/2017

History

#1 Updated by Miroslav Remák 10 months ago

  • Target version changed from openmw-0.41 to openmw-0.42

#2 Updated by scrawl . 10 months ago

  • Status changed from New to Confirmed

#3 Updated by R. D. 10 months ago

I just saw it happen in the original engine as well, although the NPC was able to walk out of the object whereas they stack stuck in it in OpenMW.

#4 Updated by R. D. 10 months ago

I meant "stay stuck"

#5 Updated by Miroslav Remák 8 months ago

  • Duplicated by Bug #3735: Sugar-Lips Habasi fell though the floor and vanished. added

#6 Updated by Marc Zinnschlag 6 months ago

  • Target version changed from openmw-0.42 to openmw-0.43

#7 Updated by Andrei Kortunov about 1 month ago

  • Subject changed from NPC stuck in Maar Gan to Fast forwarding can move NPC inside objects
  • Reproducibility changed from Have not tried to Sometimes
  • Operating system changed from Windows to Other

#8 Updated by Andrei Kortunov about 1 month 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).

#9 Updated by Andrei Kortunov about 1 month ago

  • Duplicated by Bug #3852: Sugar-Lips Habasi dropping dead added

#10 Updated by Andrei Kortunov about 1 month ago

Can we just move NPC to unoccupied allowed pathgrid, and leave NPC in place, if there are no such pathgrids?

#11 Updated by Andrei Kortunov about 1 month 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.

#12 Updated by Alexei Dobrohotov about 1 month ago

  • Category set to 8
  • Status changed from Confirmed to Resolved
  • Assignee set to Andrei Kortunov

#13 Updated by Andrei Kortunov 18 days ago

  • Status changed from Resolved to In Progress

Looks like I have a some work to do.

#14 Updated by scrawl . 9 days ago

  • Category changed from 8 to AI

Also available in: Atom PDF