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.

meow-7.2.2
prep 2012-03-12 15:04:09 -04:00
parent 999626e071
commit e558f5cb0b
5 changed files with 23 additions and 22 deletions

View File

@ -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)
{

View File

@ -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);
}

View File

@ -111,6 +111,8 @@ public:
bool getHeartBeat() const { return mHeartBeat;}
void setHeartBeat( bool state ) { mHeartBeat=state; }
void regionCrossingOccured();
protected:

View File

@ -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;
}
}

View File

@ -22,6 +22,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"