summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml12
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp17
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_console.xml1
4 files changed, 22 insertions, 9 deletions
diff --git a/autobuild.xml b/autobuild.xml
index ce3f5893f7..628141c4e6 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1110,9 +1110,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c35c738cac6bb74d242b3a7910564439</string>
+ <string>7bec0b4904ce36a2e3c2f5cf38446c9d</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/253202/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120405.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/253279/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120406.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1122,9 +1122,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>531dbd8b78d01301505900144ced7e7a</string>
+ <string>e6fe146ac8b11f380a6fb64604fe7f4f</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/253202/arch/Linux/installer/llphysicsextensions-0.1-linux-20120406.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/253279/arch/Linux/installer/llphysicsextensions-0.1-linux-20120407.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -1134,9 +1134,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>61b220db9104e513b8f967c86f084281</string>
+ <string>6d83c4aa41354d1d76eca6b7911823e0</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/253202/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120405.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/253279/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120406.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index d173764fd1..c59f960d3f 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -549,7 +549,8 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)
mConsoleState(kConsoleStateUnknown),
mPathData(),
mHasStartPoint(false),
- mHasEndPoint(false)
+ mHasEndPoint(false),
+ mHasValidPath(false)
{
mSelfHandle.bind(this);
}
@@ -631,6 +632,7 @@ void LLFloaterPathfindingConsole::onClearPathClicked()
{
mHasStartPoint = false;
mHasEndPoint = false;
+ mHasValidPath = false;
updatePathTestStatus();
}
@@ -721,6 +723,7 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState()
mClearPathButton->setEnabled(FALSE);
mHasStartPoint = false;
mHasEndPoint = false;
+ mHasValidPath = false;
break;
case kConsoleStateCheckingVersion :
case kConsoleStateDownloading :
@@ -741,6 +744,7 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState()
mClearPathButton->setEnabled(FALSE);
mHasStartPoint = false;
mHasEndPoint = false;
+ mHasValidPath = false;
break;
case kConsoleStateHasNavMesh :
mShowNavMeshCheckBox->setEnabled(TRUE);
@@ -966,12 +970,14 @@ void LLFloaterPathfindingConsole::generatePath()
mPathData.mCharacterType = LLPathingLib::LLPL_CHARACTER_TYPE_NONE;
break;
}
- LLPathingLib::getInstance()->generatePath(mPathData);
+ LLPathingLib::LLPLResult pathingResult = LLPathingLib::getInstance()->generatePath(mPathData);
+ mHasValidPath = (pathingResult == LLPathingLib::LLPL_PATH_GENERATED_OK);
}
}
void LLFloaterPathfindingConsole::updatePathTestStatus()
{
+ static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor");
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("PathfindingWarningColor");
std::string statusText("");
@@ -992,10 +998,15 @@ void LLFloaterPathfindingConsole::updatePathTestStatus()
statusText = getString("pathing_choose_end_point");
styleParams.color = warningColor;
}
- else
+ else if (mHasValidPath)
{
statusText = getString("pathing_path_valid");
}
+ else
+ {
+ statusText = getString("pathing_path_invalid");
+ styleParams.color = errorColor;
+ }
mPathTestingStatus->setText((LLStringExplicit)statusText, styleParams);
}
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index 2b61e0e1e8..85df38b370 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -203,6 +203,7 @@ private:
LLPathingLib::PathingPacket mPathData;
bool mHasStartPoint;
bool mHasEndPoint;
+ bool mHasValidPath;
U32 mShapeRenderFlags;
static LLHandle<LLFloaterPathfindingConsole> sInstanceHandle;
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
index 09fe5f4bc7..e43fda01e0 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
@@ -31,6 +31,7 @@
<floater.string name="pathing_choose_start_point">Please choose start point.</floater.string>
<floater.string name="pathing_choose_end_point">Please choose end point.</floater.string>
<floater.string name="pathing_path_valid">Path is shown in orange.</floater.string>
+ <floater.string name="pathing_path_invalid">A path between the chosen points cannot be found.</floater.string>
<panel
border="false"
bevel_style="none"