void LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
	llassert(mIsInitialized);
	if (mIsInitialized)
	{
		ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default;
		if (pNavMeshStatus.isValid())
		{
			switch (pNavMeshStatus.getStatus())
			{
			case LLPathfindingNavMeshStatus::kPending :
			case LLPathfindingNavMeshStatus::kRepending :
				rebakeNavMeshMode = kRebakeNavMesh_Available;
				break;
			case LLPathfindingNavMeshStatus::kBuilding :
				rebakeNavMeshMode = kRebakeNavMesh_InProgress;
				break;
			case LLPathfindingNavMeshStatus::kComplete :
				rebakeNavMeshMode = kRebakeNavMesh_NotAvailable;
				break;
			default : 
				rebakeNavMeshMode = kRebakeNavMesh_Default;
				llassert(0);
				break;
			}
		}

		setMode(rebakeNavMeshMode);
	}
}
void LLPathfindingManager::handleNavMeshStatusUpdate(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
	LLPathfindingNavMeshPtr navMeshPtr = getNavMeshForRegion(pNavMeshStatus.getRegionUUID());

	if (!pNavMeshStatus.isValid())
	{
		navMeshPtr->handleNavMeshError();
	}
	else
	{
		navMeshPtr->handleNavMeshNewVersion(pNavMeshStatus);
	}
}
void LLPathfindingManager::handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly)
{
	LLPathfindingNavMeshPtr navMeshPtr = getNavMeshForRegion(pNavMeshStatus.getRegionUUID());

	if (!pNavMeshStatus.isValid())
	{
		navMeshPtr->handleNavMeshError();
	}
	else
	{
		if (navMeshPtr->hasNavMeshVersion(pNavMeshStatus))
		{
			navMeshPtr->handleRefresh(pNavMeshStatus);
		}
		else if (pIsGetStatusOnly)
		{
			navMeshPtr->handleNavMeshNewVersion(pNavMeshStatus);
		}
		else
		{
			sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, pNavMeshStatus);
		}
	}
}
Ejemplo n.º 4
0
void LLStatusBar::onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
	mIsNavMeshDirty = pNavMeshStatus.isValid() && (pNavMeshStatus.getStatus() != LLPathfindingNavMeshStatus::kComplete);
	refresh();
}
Ejemplo n.º 5
0
void LLLocationInputCtrl::onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
	mIsNavMeshDirty = pNavMeshStatus.isValid() && (pNavMeshStatus.getStatus() != LLPathfindingNavMeshStatus::kComplete);
	refreshParcelIcons();
}