From 78910cf3016fc55eaf8214640b348df0f8bcdeda Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 26 Jun 2012 18:04:19 -0700 Subject: Updating the header licensing comments. --- indra/newview/llpathfindingmanager.cpp | 53 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'indra/newview/llpathfindingmanager.cpp') diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index bafcf57944..019ddbfe96 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -1,29 +1,30 @@ -/** - * @file llpathfindingmanager.cpp - * @author William Todd Stinson - * @brief A state manager for the various pathfinding states. - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ +/** +* @file llpathfindingmanager.cpp +* @brief Implementation of llpathfindingmanager +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + #include "llviewerprecompiledheaders.h" -- cgit v1.2.3 From a818cd4f7336ed9b33dacd91fcaf5239a8be813d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 26 Jun 2012 18:22:17 -0700 Subject: Renaming the rebake navmesh panel class. --- indra/newview/llpathfindingmanager.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpathfindingmanager.cpp') diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 019ddbfe96..90199a9cae 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -53,7 +53,6 @@ #include "lluuid.h" #include "llviewerregion.h" #include "llweb.h" -#include "llpanelnavmeshrebake.h" #include "llenvmanager.h" #define CAP_SERVICE_RETRIEVE_NAVMESH "RetrieveNavMeshSrc" -- cgit v1.2.3 From 685a672b74550ca0dbf8a816257c84c9c44fd34d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 28 Jun 2012 15:37:55 -0700 Subject: Cleaning up new files in preparation for merge into viewer-release. --- indra/newview/llpathfindingmanager.cpp | 47 ++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 19 deletions(-) (limited to 'indra/newview/llpathfindingmanager.cpp') diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 90199a9cae..2dd01e931e 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -33,7 +33,9 @@ #include #include +#include #include +#include #include #include "llagent.h" @@ -53,7 +55,6 @@ #include "lluuid.h" #include "llviewerregion.h" #include "llweb.h" -#include "llenvmanager.h" #define CAP_SERVICE_RETRIEVE_NAVMESH "RetrieveNavMeshSrc" @@ -366,12 +367,6 @@ void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion, b } } -LLPathfindingManager::agent_state_slot_t LLPathfindingManager::registerAgentStateListener(agent_state_callback_t pAgentStateCallback) -{ - return mAgentStateSignal.connect(pAgentStateCallback); -} - - void LLPathfindingManager::requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const { LLPathfindingObjectListPtr emptyLinksetListPtr; @@ -495,6 +490,11 @@ void LLPathfindingManager::requestGetCharacters(request_id_t pRequestId, object_ } } +LLPathfindingManager::agent_state_slot_t LLPathfindingManager::registerAgentStateListener(agent_state_callback_t pAgentStateCallback) +{ + return mAgentStateSignal.connect(pAgentStateCallback); +} + void LLPathfindingManager::requestGetAgentState() { LLViewerRegion *currentRegion = getCurrentRegion(); @@ -525,14 +525,24 @@ void LLPathfindingManager::requestGetAgentState() void LLPathfindingManager::requestRebakeNavMesh(rebake_navmesh_callback_t pRebakeNavMeshCallback) { - std::string navMeshStatusURL = getNavMeshStatusURLForCurrentRegion(); - llassert(!navMeshStatusURL.empty()) - if (!navMeshStatusURL.empty()) + LLViewerRegion *currentRegion = getCurrentRegion(); + + if (currentRegion == NULL) + { + pRebakeNavMeshCallback(false); + } + else if (!isPathfindingEnabledForRegion(currentRegion)) { - LLSD mPostData; - mPostData["command"] = "rebuild"; + pRebakeNavMeshCallback(false); + } + else + { + std::string navMeshStatusURL = getNavMeshStatusURLForCurrentRegion(); + llassert(!navMeshStatusURL.empty()); + LLSD postData; + postData["command"] = "rebuild"; LLHTTPClient::ResponderPtr responder = new NavMeshRebakeResponder(navMeshStatusURL, pRebakeNavMeshCallback); - LLHTTPClient::post(navMeshStatusURL, mPostData, responder); + LLHTTPClient::post(navMeshStatusURL, postData, responder); } } @@ -673,11 +683,6 @@ LLPathfindingNavMeshPtr LLPathfindingManager::getNavMeshForRegion(LLViewerRegion return getNavMeshForRegion(regionUUID); } -std::string LLPathfindingManager::getAgentStateURLForRegion(LLViewerRegion *pRegion) const -{ - return getCapabilityURLForRegion(pRegion, CAP_SERVICE_AGENT_STATE); -} - std::string LLPathfindingManager::getNavMeshStatusURLForCurrentRegion() const { return getNavMeshStatusURLForRegion(getCurrentRegion()); @@ -708,6 +713,11 @@ std::string LLPathfindingManager::getCharactersURLForCurrentRegion() const return getCapabilityURLForCurrentRegion(CAP_SERVICE_CHARACTERS); } +std::string LLPathfindingManager::getAgentStateURLForRegion(LLViewerRegion *pRegion) const +{ + return getCapabilityURLForRegion(pRegion, CAP_SERVICE_AGENT_STATE); +} + std::string LLPathfindingManager::getCapabilityURLForCurrentRegion(const std::string &pCapabilityName) const { return getCapabilityURLForRegion(getCurrentRegion(), pCapabilityName); @@ -1037,4 +1047,3 @@ void CharactersResponder::error(U32 pStatus, const std::string &pReason) LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList()); mCharactersCallback(mRequestId, LLPathfindingManager::kRequestError, characterListPtr); } - -- cgit v1.2.3