Project

General

Profile

Bug #3638

Fast forwarding can move NPC inside objects

Added by Miroslav Gavrilović 12 months ago. Updated 6 days ago.

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

100%

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 12 months ago

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

#2 Updated by scrawl . 12 months ago

  • Status changed from New to Confirmed

#3 Updated by R. D. 12 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. 12 months ago

I meant "stay stuck"

#5 Updated by Miroslav Remák 10 months ago

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

#6 Updated by Marc Zinnschlag 7 months ago

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

#7 Updated by Andrei Kortunov 3 months 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 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).

#9 Updated by Andrei Kortunov 3 months ago

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

#10 Updated by Andrei Kortunov 3 months 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 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.

#12 Updated by Alexei Dobrohotov 3 months ago

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

#13 Updated by Andrei Kortunov 2 months ago

  • Status changed from Resolved to In Progress

Looks like I have a some work to do.

#14 Updated by scrawl . 2 months ago

  • Category changed from 8 to AI

#15 Updated by Marc Zinnschlag 25 days ago

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

#16 Updated by Alexei Dobrohotov 6 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF