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:
parent
ff1af5e8ec
commit
1552e7e3e3
2 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue