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);
	}
}
Ejemplo n.º 2
0
void LLPathfindingNavMeshZone::NavMeshLocation::handleNavMesh(LLPathfindingNavMesh::ENavMeshRequestStatus pNavMeshRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus, const LLSD::Binary &pNavMeshData)
{
	llassert(mRegionUUID == pNavMeshStatus.getRegionUUID());

	if ((pNavMeshRequestStatus == LLPathfindingNavMesh::kNavMeshRequestCompleted) &&
		(!mHasNavMesh || (mNavMeshVersion != pNavMeshStatus.getVersion())))
	{
		llassert(!pNavMeshData.empty());
		mHasNavMesh = true;
		mNavMeshVersion = pNavMeshStatus.getVersion();
		llassert(LLPathingLib::getInstance() != NULL);
		if (LLPathingLib::getInstance() != NULL)
		{
			LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD(pNavMeshData, mDirection);
		}
	}

	mRequestStatus = pNavMeshRequestStatus;
	mNavMeshStatus = pNavMeshStatus.getStatus();
	mLocationCallback();
}
Ejemplo n.º 3
0
void LLStatusBar::onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
	mIsNavMeshDirty = pNavMeshStatus.isValid() && (pNavMeshStatus.getStatus() != LLPathfindingNavMeshStatus::kComplete);
	refresh();
}
Ejemplo n.º 4
0
void LLLocationInputCtrl::onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
	mIsNavMeshDirty = pNavMeshStatus.isValid() && (pNavMeshStatus.getStatus() != LLPathfindingNavMeshStatus::kComplete);
	refreshParcelIcons();
}