Support teleporting doors for pathfinding

It's not an original Morrowind feature. But it is possible to implement it using recastnavigation.

OpenMW has non-teleporting doors support for pathfinding. There is an off-mesh connection, a special entity on navmesh for this. It connect's any two points in the same navmesh. An actor assumes it will be teleported from one point to another using a given path. But now it is not teleporting anywhere. Another part of OpenMW handles a situation when an actor is near a closed door. It just opens the door right before it reaches the first off-mesh connection point. Then this point is removed from the path as reached and the actor just goes to the next.

Teleporting doors require to have navmesh for both interior and exterior cells at the same time. Off-mesh connection will use teleport points to link navmesh points. Somehow the actor should activate the door near it right when the path point is removed. It should check if the next point is a teleport start and is it close enough to use an activator. Otherwise it will try to go directly to the next one (teleport destination) through a wall without any success.

Another problem is the path between two different interior cells through an exterior. For this, coordinates of objects in interior cells should not overlap. They overlap right now, because all interior cells have the same world coordinates.

To resolve this issue, start from here.

Edited by elsid