diff --git a/apps/opencs/view/render/pathgrid.cpp b/apps/opencs/view/render/pathgrid.cpp index f2920d7fb..a28471782 100644 --- a/apps/opencs/view/render/pathgrid.cpp +++ b/apps/opencs/view/render/pathgrid.cpp @@ -204,7 +204,7 @@ namespace CSVRender osg::Vec3f start = osg::Vec3f(pointA.mX, pointA.mY, pointA.mZ + SceneUtil::DiamondHalfHeight); osg::Vec3f end = osg::Vec3f(pointB.mX, pointB.mY, pointB.mZ + SceneUtil::DiamondHalfHeight); - createConnectionGeometry(start, end); + createConnectionGeometry(start, end, true); } } } @@ -220,7 +220,7 @@ namespace CSVRender osg::Vec3f start = osg::Vec3f(point.mX, point.mY, point.mZ + SceneUtil::DiamondHalfHeight); osg::Vec3f end = pos - mBaseNode->getPosition(); - createConnectionGeometry(start, end); + createConnectionGeometry(start, end, false); } } } @@ -593,7 +593,7 @@ namespace CSVRender } } - void Pathgrid::createConnectionGeometry(const osg::Vec3f& start, const osg::Vec3f& end) + void Pathgrid::createConnectionGeometry(const osg::Vec3f& start, const osg::Vec3f& end, bool valid) { if (mConnectionGeometry) mPathgridGeode->removeDrawable(mConnectionGeometry); @@ -606,7 +606,16 @@ namespace CSVRender (*vertices)[0] = start; (*vertices)[1] = end; - (*colors)[0] = osg::Vec4f(0.4f, 1.f, 0.4f, 1.f); + + if (valid) + { + (*colors)[0] = osg::Vec4f(0.91f, 0.66f, 1.f, 1.f); + } + else + { + (*colors)[0] = osg::Vec4f(1.f, 0.f, 0.f, 1.f); + } + indices->setElement(0, 0); indices->setElement(1, 1); diff --git a/apps/opencs/view/render/pathgrid.hpp b/apps/opencs/view/render/pathgrid.hpp index 9f6cf2686..415b252e0 100644 --- a/apps/opencs/view/render/pathgrid.hpp +++ b/apps/opencs/view/render/pathgrid.hpp @@ -121,7 +121,7 @@ namespace CSVRender void removePathgridGeometry(); void removeSelectedGeometry(); - void createConnectionGeometry(const osg::Vec3f& start, const osg::Vec3f& end); + void createConnectionGeometry(const osg::Vec3f& start, const osg::Vec3f& end, bool valid); const CSMWorld::Pathgrid* getPathgridSource(); diff --git a/apps/opencs/view/render/pathgridmode.cpp b/apps/opencs/view/render/pathgridmode.cpp index fc16d7d99..e9d608099 100644 --- a/apps/opencs/view/render/pathgridmode.cpp +++ b/apps/opencs/view/render/pathgridmode.cpp @@ -37,7 +37,6 @@ namespace CSVRender "
Note: Only a single cell's pathgrid may be edited at a time");
}
diff --git a/components/sceneutil/pathgridutil.cpp b/components/sceneutil/pathgridutil.cpp
index 48e398132..1497beb2b 100644
--- a/components/sceneutil/pathgridutil.cpp
+++ b/components/sceneutil/pathgridutil.cpp
@@ -71,8 +71,8 @@ namespace SceneUtil
};
const osg::Vec4f DiamondEdgeColor = osg::Vec4f(0.5f, 1.f, 1.f, 1.f);
- const osg::Vec4f DiamondWireColor = osg::Vec4f(0.8f, 1.f, 0.9f, 1.f);
- const osg::Vec4f DiamondFocusWireColor = osg::Vec4f(0.4f, 1.f, 0.4f, 1.f);
+ const osg::Vec4f DiamondWireColor = osg::Vec4f(0.72f, 0.f, 0.96f, 1.f);
+ const osg::Vec4f DiamondFocusWireColor = osg::Vec4f(0.91f, 0.66f, 1.f, 1.f);
osg::ref_ptr