From e558f5cb0b8c0937da0f08a1af149afbc497462c Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 12 Mar 2012 15:04:09 -0400 Subject: path-405: Avatar is no longer frozen when pathing window is up and when avatar crosses a region boundary the resident is informed with a message in the pathing window. --- indra/newview/llagent.cpp | 24 ++-------------------- indra/newview/llfloaterpathfindingconsole.cpp | 9 ++++++++ indra/newview/llfloaterpathfindingconsole.h | 2 ++ indra/newview/llworld.cpp | 9 ++++++++ .../default/xui/en/floater_pathfinding_console.xml | 1 + 5 files changed, 23 insertions(+), 22 deletions(-) (limited to 'indra/newview') 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 493b4617b5..c336a30bc9 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -873,3 +873,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 8c29bf5909..0f9f859924 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 #include @@ -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 75465f1aea..dd31a71e0f 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -22,6 +22,7 @@ Please choose start point. Please choose end point. Path is shown in blue. + Region boundary hit, navmesh may not be accurate. Update.