diff options
| -rwxr-xr-x | indra/newview/llagent.cpp | 24 | ||||
| -rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 10 | 
3 files changed, 35 insertions, 5 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ab9b5ff436..657e464cbb 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -88,6 +88,7 @@  #include "llworld.h"  #include "llworldmap.h"  #include "stringize.h" +#include "llfloaterpathfindingconsole.h"  using namespace LLVOAvatarDefines; @@ -399,6 +400,12 @@ 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); @@ -427,6 +434,11 @@ 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); @@ -648,6 +660,12 @@ void LLAgent::setFlying(BOOL fly)  // static  void LLAgent::toggleFlying()  { +	LLFloaterPathfindingConsole* pWindow = LLFloaterPathfindingConsole::getInstanceHandle().get();
 +	if ( pWindow && pWindow->getHeartBeat() ) +	{ +		return; +	} +  	if ( gAgent.mAutoPilot )  	{  		LLToolPie::instance().stopClickToWalk(); @@ -2706,6 +2724,12 @@ 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 862f4d2fda..2bf46175ee 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -149,7 +149,7 @@ BOOL LLFloaterPathfindingConsole::postBuild()  void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
  {
  	LLFloater::onOpen(pKey);
 -
 +	setHeartBeat( true );
  	//make sure we have a pathing system
  	if ( !LLPathingLib::getInstance() )
  	{
 @@ -250,6 +250,7 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting)  	}
  	LLPathingLib::getInstance()->cleanupResidual();
  	LLFloater::onClose(pIsAppQuitting);
 +	setHeartBeat( false );
  }
  BOOL LLFloaterPathfindingConsole::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
 @@ -540,7 +541,8 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)  	mNavMeshCnt(0),
  	mHasStartPoint(false),
  	mHasEndPoint(false),
 -	mNeighboringRegion( CURRENT_REGION )
 +	mNeighboringRegion( CURRENT_REGION ),
 +	mHeartBeat( false )
  {
  	mSelfHandle.bind(this);
 diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index fc135d7dd7..34a68ebed1 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -111,6 +111,9 @@ public:  	void setHasNavMeshReceived();  	void setHasNoNavMesh(); +	bool getHeartBeat() const { return mHeartBeat;} +	void setHeartBeat( bool state ) { mHeartBeat=state; } +  protected:  private: @@ -168,9 +171,10 @@ private:  	U32							mNeighboringRegion;  	//Container that is populated and subsequently submitted to the LLPathingSystem for processing  	LLPathingLib::PathingPacket		mPathData; -	bool mHasStartPoint; -	bool mHasEndPoint; -	U32							mShapeRenderFlags; +	bool							mHasStartPoint; +	bool							mHasEndPoint; +	U32								mShapeRenderFlags; +	bool							mHeartBeat;  	static LLHandle<LLFloaterPathfindingConsole> sInstanceHandle;  };  | 
