Removing unused methods and members from the pathfinding manager.
parent
f5a5e687b7
commit
37f3a016fc
|
|
@ -286,26 +286,10 @@ private:
|
|||
LLPathfindingManager::LLPathfindingManager()
|
||||
: LLSingleton<LLPathfindingManager>(),
|
||||
mNavMeshMap(),
|
||||
mCrossingSlot(),
|
||||
mAgentStateSignal(),
|
||||
mNavMeshSlot()
|
||||
mAgentStateSignal()
|
||||
{
|
||||
}
|
||||
|
||||
void LLPathfindingManager::onRegionBoundaryCrossed()
|
||||
{
|
||||
if (mNavMeshSlot.connected())
|
||||
{
|
||||
mNavMeshSlot.disconnect();
|
||||
}
|
||||
LLViewerRegion *currentRegion = getCurrentRegion();
|
||||
if (currentRegion != NULL)
|
||||
{
|
||||
mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));
|
||||
requestGetNavMeshForRegion(currentRegion, true);
|
||||
}
|
||||
}
|
||||
|
||||
LLPathfindingManager::~LLPathfindingManager()
|
||||
{
|
||||
quitSystem();
|
||||
|
|
@ -317,36 +301,10 @@ void LLPathfindingManager::initSystem()
|
|||
{
|
||||
LLPathingLib::initSystem();
|
||||
}
|
||||
|
||||
if ( !mCrossingSlot.connected() )
|
||||
{
|
||||
mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this));
|
||||
}
|
||||
|
||||
if (mNavMeshSlot.connected())
|
||||
{
|
||||
mNavMeshSlot.disconnect();
|
||||
}
|
||||
LLViewerRegion *currentRegion = getCurrentRegion();
|
||||
if (currentRegion != NULL)
|
||||
{
|
||||
mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));
|
||||
requestGetNavMeshForRegion(currentRegion, true);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPathfindingManager::quitSystem()
|
||||
{
|
||||
if (mNavMeshSlot.connected())
|
||||
{
|
||||
mNavMeshSlot.disconnect();
|
||||
}
|
||||
|
||||
if (mCrossingSlot.connected())
|
||||
{
|
||||
mCrossingSlot.disconnect();
|
||||
}
|
||||
|
||||
if (LLPathingLib::getInstance() != NULL)
|
||||
{
|
||||
LLPathingLib::quitSystem();
|
||||
|
|
@ -741,36 +699,6 @@ LLViewerRegion *LLPathfindingManager::getCurrentRegion() const
|
|||
return gAgent.getRegion();
|
||||
}
|
||||
|
||||
void LLPathfindingManager::handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus)
|
||||
{
|
||||
if (!pNavMeshStatus.isValid())
|
||||
{
|
||||
llinfos << "STINSON DEBUG: navmesh status is invalid" << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (pNavMeshStatus.getStatus())
|
||||
{
|
||||
case LLPathfindingNavMeshStatus::kPending :
|
||||
llinfos << "STINSON DEBUG: navmesh status is kPending" << llendl;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kBuilding :
|
||||
llinfos << "STINSON DEBUG: navmesh status is kBuilding" << llendl;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kComplete :
|
||||
llinfos << "STINSON DEBUG: navmesh status is kComplete" << llendl;
|
||||
break;
|
||||
case LLPathfindingNavMeshStatus::kRepending :
|
||||
llinfos << "STINSON DEBUG: navmesh status is kRepending" << llendl;
|
||||
break;
|
||||
default :
|
||||
llinfos << "STINSON DEBUG: navmesh status is default" << llendl;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
void LLPathfindingManager::displayNavMeshRebakePanel()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ public:
|
|||
void handleNavMeshRebakeResult( const LLSD &pContent );
|
||||
void handleNavMeshRebakeError( U32 pStatus, const std::string &pReason, const std::string &pURL );
|
||||
void triggerNavMeshRebuild();
|
||||
void onRegionBoundaryCrossed();
|
||||
void requestGetAgentState();
|
||||
|
||||
protected:
|
||||
|
|
@ -125,8 +124,6 @@ private:
|
|||
std::string getCapabilityURLForRegion(LLViewerRegion *pRegion, const std::string &pCapabilityName) const;
|
||||
LLViewerRegion *getCurrentRegion() const;
|
||||
|
||||
void handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus);
|
||||
|
||||
#if 0
|
||||
void displayNavMeshRebakePanel();
|
||||
void hideNavMeshRebakePanel();
|
||||
|
|
@ -134,10 +131,8 @@ private:
|
|||
void handleAgentStateResult(const LLSD &pContent );
|
||||
void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL);
|
||||
|
||||
NavMeshMap mNavMeshMap;
|
||||
agent_state_slot_t mCrossingSlot;
|
||||
agent_state_signal_t mAgentStateSignal;
|
||||
LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
|
||||
NavMeshMap mNavMeshMap;
|
||||
agent_state_signal_t mAgentStateSignal;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue