summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-13 10:34:25 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-03-13 10:34:25 -0700
commita8d5d6f45e34ff965fd9adc1d9824eb2840171a3 (patch)
tree6a12ee343917f8aba9a0ec382e748430b8acd6e7
parentb84db8354d992cfddfd64eb80ebd80c4b6baf3f8 (diff)
parent87b414c4934d0d52eef0b323245568bb1e95ec70 (diff)
Pull and merge from ssh://hg@bitbucket.org/stinson_linden/viewer-development-havokai.
-rwxr-xr-xindra/newview/llagent.cpp24
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp16
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h2
-rw-r--r--indra/newview/llworld.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_console.xml1
5 files changed, 30 insertions, 22 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 1132ee4ea8..9d23d439fa 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -400,12 +400,7 @@ void LLAgent::ageChat()
//-----------------------------------------------------------------------------
void LLAgent::moveAt(S32 direction, bool reset)
{
- LLFloaterPathfindingConsole* pWindow = LLFloaterPathfindingConsole::getInstanceHandle().get();
- if ( pWindow && pWindow->getHeartBeat() )
- {
- return;
- }
-
+
mMoveTimer.reset();
LLFirstUse::notMoving(false);
@@ -434,11 +429,6 @@ void LLAgent::moveAt(S32 direction, bool reset)
//-----------------------------------------------------------------------------
void LLAgent::moveAtNudge(S32 direction)
{
- LLFloaterPathfindingConsole* pWindow = LLFloaterPathfindingConsole::getInstanceHandle().get();
- if ( pWindow && pWindow->getHeartBeat() )
- {
- return;
- }
mMoveTimer.reset();
LLFirstUse::notMoving(false);
@@ -660,11 +650,6 @@ void LLAgent::setFlying(BOOL fly)
// static
void LLAgent::toggleFlying()
{
- LLFloaterPathfindingConsole* pWindow = LLFloaterPathfindingConsole::getInstanceHandle().get();
- if ( pWindow && pWindow->getHeartBeat() )
- {
- return;
- }
if ( gAgent.mAutoPilot )
{
@@ -2724,12 +2709,7 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
void LLAgent::sendWalkRun(bool running)
{
- LLFloaterPathfindingConsole* pWindow = LLFloaterPathfindingConsole::getInstanceHandle().get();
- if ( pWindow->getHeartBeat() )
- {
- return;
- }
-
+
LLMessageSystem* msgsys = gMessageSystem;
if (msgsys)
{
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 487ef0933a..7e86819568 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -207,6 +207,13 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting)
LLFloater::onClose(pIsAppQuitting);
setHeartBeat( false );
setConsoleState(kConsoleStateUnknown);
+ //Reset all the checkboxes to default
+ mShowNavMeshCheckBox->set( false );
+ mShowWalkablesCheckBox->set( false );
+ mShowMaterialVolumesCheckBox->set( false );
+ mShowStaticObstaclesCheckBox->set( false );
+ mShowExclusionVolumesCheckBox->set( false );
+ mShowWorldCheckBox->set( false );
}
BOOL LLFloaterPathfindingConsole::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
@@ -880,3 +887,12 @@ U32 LLFloaterPathfindingConsole::getRenderShapeFlags()
}
return mShapeRenderFlags;
}
+
+void LLFloaterPathfindingConsole::regionCrossingOccured()
+{
+ std::string statusText("");
+ LLStyle::Params styleParams;
+ styleParams.color = LLUIColorTable::instance().getColor("DrYellow");
+ statusText = getString("navmesh_update_needed");
+ mPathfindingStatus->setText((LLStringExplicit)statusText, styleParams);
+} \ No newline at end of file
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index c58dc83653..a1973e0985 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -111,6 +111,8 @@ public:
bool getHeartBeat() const { return mHeartBeat;}
void setHeartBeat( bool state ) { mHeartBeat=state; }
+ void regionCrossingOccured();
+
protected:
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 676287c0ad..9fd77546eb 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -55,6 +55,7 @@
#include "message.h"
#include "pipeline.h"
#include "llappviewer.h" // for do_disconnect()
+#include "llfloaterpathfindingconsole.h"
#include <deque>
#include <queue>
@@ -1091,6 +1092,14 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data)
}
regionp->unpackRegionHandshake();
+
+ LLFloaterPathfindingConsole* pWindow = LLFloaterPathfindingConsole::getInstanceHandle().get();
+ if ( pWindow && pWindow->getHeartBeat() )
+ {
+ pWindow->regionCrossingOccured();
+ return;
+ }
+
}
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 d23d62674f..aaf94483df 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
@@ -23,6 +23,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 blue.</floater.string>
+ <floater.string name="navmesh_update_needed">Region boundary hit, navmesh may not be accurate. Update.</floater.string>
<text
height="13"
word_wrap="true"