Clean out the link vars and functions from guinaveditorctrl its now handled by the tool

offmeshcontool: Add ability to continue to draw from the last links end point holding shift
This commit is contained in:
marauder2k7 2025-07-25 08:46:55 +01:00
parent 2df2cb5c15
commit a0b4b8627f
3 changed files with 12 additions and 57 deletions

View file

@ -67,7 +67,12 @@ void OffMeshConnectionTool::on3DMouseDown(const Gui3DMouseEvent& evt)
{
mLink = mNavMesh->addLink(mLinkStart, ri.point, mBiDir);
mNavMesh->selectLink(mLink, true, false);
mLinkStart = Point3F::Max;
if (shift)
mLinkStart = ri.point;
else
mLinkStart = Point3F::Max;
Con::executef(this, "onLinkSelected", Con::getIntArg(mLinkCache.getFlags()), Con::getBoolArg(mBiDir));
}
else
@ -156,6 +161,9 @@ bool OffMeshConnectionTool::updateGuiInfo()
String text;
text = "LMB To Select Link. CTRL+LMB To Delete Link";
if (mLinkStart != Point3F::Max)
text = "LinkStarted: LMB To place End Point. Hold Left Shift to start a new Link from the end point.";
if (statusbar)
Con::executef(statusbar, "setInfo", text.c_str());