summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorprep <none@none>2012-05-22 14:59:40 -0400
committerprep <none@none>2012-05-22 14:59:40 -0400
commit80775acb4d8014e057fb3de8a1d025c48da41411 (patch)
tree8ccef0cbd7136bc520040c7f9a8ff546b0708cb8 /indra/newview
parentb1013ca76072531340779919d55a1a4f628989e5 (diff)
parent4f3a748b5b4dfb3581e3a4ccdc90ad56e2e3ad3d (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp43
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h4
2 files changed, 34 insertions, 13 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index f6eb40abdc..54e60ce0f4 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -50,6 +50,7 @@
#include "lltoolfocus.h"
#include "pipeline.h"
#include "llpathinglib.h"
+#include "llviewerparcelmgr.h"
#define XUI_RENDER_HEATMAP_NONE 0
#define XUI_RENDER_HEATMAP_A 1
@@ -101,8 +102,8 @@ BOOL LLFloaterPathfindingConsole::postBuild()
mShowWorldCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldSet, this));
mShowWorldMovablesOnlyCheckBox = findChild<LLCheckBoxCtrl>("show_world_movables_only");
- mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRenderWorldMovablesOnly, this));
llassert(mShowWorldMovablesOnlyCheckBox != NULL);
+ mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldMovablesOnlySet, this));
mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh");
llassert(mShowNavMeshCheckBox != NULL);
@@ -255,6 +256,11 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
mRegionBoundarySlot = LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionBoundaryCross, this));
}
+ if (!mTeleportFailedSlot.connected())
+ {
+ mTeleportFailedSlot = LLViewerParcelMgr::getInstance()->setTeleportFailedCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionBoundaryCross, this));
+ }
+
if (!mPathEventSlot.connected())
{
mPathEventSlot = LLPathfindingPathTool::getInstance()->registerPathEventListener(boost::bind(&LLFloaterPathfindingConsole::onPathEvent, this));
@@ -279,6 +285,11 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting)
mPathEventSlot.disconnect();
}
+ if (mTeleportFailedSlot.connected())
+ {
+ mTeleportFailedSlot.disconnect();
+ }
+
if (mRegionBoundarySlot.connected())
{
mRegionBoundarySlot.disconnect();
@@ -513,6 +524,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)
mIsNavMeshUpdating(false),
mAgentStateSlot(),
mRegionBoundarySlot(),
+ mTeleportFailedSlot(),
mPathEventSlot(),
mPathfindingToolset(NULL),
mSavedToolset(NULL),
@@ -542,6 +554,12 @@ LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole()
void LLFloaterPathfindingConsole::onShowWorldSet()
{
setWorldRenderState();
+ updateRenderablesObjects();
+}
+
+void LLFloaterPathfindingConsole::onShowWorldMovablesOnlySet()
+{
+ updateRenderablesObjects();
}
void LLFloaterPathfindingConsole::onShowNavMeshSet()
@@ -603,17 +621,6 @@ void LLFloaterPathfindingConsole::onClearPathClicked()
clearPath();
}
-void LLFloaterPathfindingConsole::onRenderWorldMovablesOnly()
-{
- if ( mShowWorldMovablesOnlyCheckBox->get() )
- {
- gPipeline.hidePermanentObjects( mRenderableRestoreList );
- }
- else
- {
- cleanupRenderableRestoreItems();
- }
-}
void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus)
{
switch (pNavMeshZoneRequestStatus)
@@ -737,6 +744,18 @@ void LLFloaterPathfindingConsole::setNavMeshRenderState()
mShowNavMeshWalkabilityComboBox->setEnabled(renderNavMesh);
}
+void LLFloaterPathfindingConsole::updateRenderablesObjects()
+{
+ if ( isRenderWorldMovablesOnly() )
+ {
+ gPipeline.hidePermanentObjects( mRenderableRestoreList );
+ }
+ else
+ {
+ cleanupRenderableRestoreItems();
+ }
+}
+
void LLFloaterPathfindingConsole::updateControlsOnConsoleState()
{
switch (mConsoleState)
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index 348deeed00..edbeae2012 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -116,6 +116,7 @@ private:
virtual ~LLFloaterPathfindingConsole();
void onShowWorldSet();
+ void onShowWorldMovablesOnlySet();
void onShowNavMeshSet();
void onShowWalkabilitySet();
void onViewCharactersClicked();
@@ -126,7 +127,6 @@ private:
void onCharacterWidthSet();
void onCharacterTypeSwitch();
void onClearPathClicked();
- void onRenderWorldMovablesOnly();
void onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus);
void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState);
@@ -137,6 +137,7 @@ private:
void setConsoleState(EConsoleState pConsoleState);
void setWorldRenderState();
void setNavMeshRenderState();
+ void updateRenderablesObjects();
void updateControlsOnConsoleState();
void updateStatusOnConsoleState();
@@ -201,6 +202,7 @@ private:
LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
boost::signals2::connection mRegionBoundarySlot;
+ boost::signals2::connection mTeleportFailedSlot;
LLPathfindingPathTool::path_event_slot_t mPathEventSlot;
LLToolset *mPathfindingToolset;