diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-03-08 12:34:11 -0800 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-08 12:34:11 -0800 |
| commit | f578181af9cbe3277374578c27487e2e72956079 (patch) | |
| tree | ab7c041c277d708f805dc3bf9e80418616c19277 /indra/newview/llfloaterpathfindingconsole.cpp | |
| parent | dcf7ed021b11b2ec990625389aa185081eeab915 (diff) | |
PATH-304: Adding functionality to handle the reloading of out-of-date navmeshes.
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
| -rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 6824e629c9..493b4617b5 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -171,6 +171,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) mNavMeshZoneSlot = mNavMeshZone.registerNavMeshZoneListener(boost::bind(&LLFloaterPathfindingConsole::onNavMeshZoneCB, this, _1));
}
+ mIsNavMeshUpdating = false;
mNavMeshZone.initialize();
mNavMeshZone.enable();
@@ -478,6 +479,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mClearPathButton(NULL),
mNavMeshZoneSlot(),
mNavMeshZone(),
+ mIsNavMeshUpdating(false),
mAgentStateSlot(),
mConsoleState(kConsoleStateUnknown),
mPathData(),
@@ -616,10 +618,15 @@ void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENav case LLPathfindingNavMeshZone::kNavMeshZoneRequestUnknown :
setConsoleState(kConsoleStateUnknown);
break;
+ case LLPathfindingNavMeshZone::kNavMeshZoneRequestNeedsUpdate :
+ mIsNavMeshUpdating = true;
+ mNavMeshZone.refresh();
+ break;
case LLPathfindingNavMeshZone::kNavMeshZoneRequestStarted :
setConsoleState(kConsoleStateDownloading);
break;
case LLPathfindingNavMeshZone::kNavMeshZoneRequestCompleted :
+ mIsNavMeshUpdating = false;
setConsoleState(kConsoleStateHasNavMesh);
break;
case LLPathfindingNavMeshZone::kNavMeshZoneRequestNotEnabled :
@@ -689,7 +696,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mHasEndPoint = false;
break;
case kConsoleStateHasNavMesh :
- case kConsoleStateHasNavMeshDownloading :
mShowNavMeshCheckBox->setEnabled(TRUE);
mShowNavMeshWalkabilityComboBox->setEnabled(TRUE);
mShowWalkablesCheckBox->setEnabled(TRUE);
@@ -731,14 +737,18 @@ void LLFloaterPathfindingConsole::updateStatusOnConsoleState() styleParams.color = warningColor;
break;
case kConsoleStateDownloading :
- statusText = getString("navmesh_status_downloading");
+ if (mIsNavMeshUpdating)
+ {
+ statusText = getString("navmesh_status_updating");
+ }
+ else
+ {
+ statusText = getString("navmesh_status_downloading");
+ }
break;
case kConsoleStateHasNavMesh :
statusText = getString("navmesh_status_has_navmesh");
break;
- case kConsoleStateHasNavMeshDownloading :
- statusText = getString("navmesh_status_has_navmesh_downloading");
- break;
case kConsoleStateError :
statusText = getString("navmesh_status_error");
styleParams.color = warningColor;
|
