1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 06:09:42 +00:00

Add pathgrid edges as one direction off mesh connection

This commit is contained in:
elsid 2021-06-27 17:45:40 +02:00
parent ff1af5e8ec
commit 1552e7e3e3
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
2 changed files with 5 additions and 7 deletions

View file

@ -389,7 +389,7 @@ namespace
const auto offMeshConVerts = getOffMeshVerts(offMeshConnections); const auto offMeshConVerts = getOffMeshVerts(offMeshConnections);
const std::vector<float> offMeshConRad(offMeshConnections.size(), getRadius(settings, agentHalfExtents)); const std::vector<float> offMeshConRad(offMeshConnections.size(), getRadius(settings, agentHalfExtents));
const std::vector<unsigned char> offMeshConDir(offMeshConnections.size(), DT_OFFMESH_CON_BIDIR); const std::vector<unsigned char> offMeshConDir(offMeshConnections.size(), 0);
const std::vector<unsigned char> offMeshConAreas = getOffMeshConAreas(offMeshConnections); const std::vector<unsigned char> offMeshConAreas = getOffMeshConAreas(offMeshConnections);
const std::vector<unsigned short> offMeshConFlags = getOffMeshFlags(offMeshConnections); const std::vector<unsigned short> offMeshConFlags = getOffMeshFlags(offMeshConnections);

View file

@ -55,12 +55,10 @@ namespace DetourNavigator
{ {
if (addObject(id, static_cast<const ObjectShapes&>(shapes), transform)) if (addObject(id, static_cast<const ObjectShapes&>(shapes), transform))
{ {
mNavMeshManager.addOffMeshConnection( const osg::Vec3f start = toNavMeshCoordinates(mSettings, shapes.mConnectionStart);
id, const osg::Vec3f end = toNavMeshCoordinates(mSettings, shapes.mConnectionEnd);
toNavMeshCoordinates(mSettings, shapes.mConnectionStart), mNavMeshManager.addOffMeshConnection(id, start, end, AreaType_door);
toNavMeshCoordinates(mSettings, shapes.mConnectionEnd), mNavMeshManager.addOffMeshConnection(id, end, start, AreaType_door);
AreaType_door
);
return true; return true;
} }
return false; return false;