diff options
Diffstat (limited to 'indra/newview')
27 files changed, 51 insertions, 867 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0be289052c..b47615b198 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -218,7 +218,6 @@ set(viewer_SOURCE_FILES llfloaterobjectweights.cpp llfloateropenobject.cpp llfloateroutbox.cpp - llfloaterpathfindingbasic.cpp llfloaterpathfindingcharacters.cpp llfloaterpathfindingconsole.cpp llfloaterpathfindinglinksets.cpp @@ -790,7 +789,6 @@ set(viewer_HEADER_FILES llfloaterobjectweights.h llfloateropenobject.h llfloateroutbox.h - llfloaterpathfindingbasic.h llfloaterpathfindingcharacters.h llfloaterpathfindingconsole.h llfloaterpathfindinglinksets.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index ff4d9ceb93..cb6bdc627f 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -157,16 +157,6 @@ is_running_function="Floater.IsOpen" is_running_parameters="people" /> - <command name="pathfinding_basic" - available_in_toybox="false" - icon="Command_PF_Basic_Icon" - label_ref="Command_PF_Basic_Label" - tooltip_ref="Command_PF_Basic_Tooltip" - execute_function="Floater.ToggleOrBringToFront" - execute_parameters="pathfinding_basic" - is_running_function="Floater.IsOpen" - is_running_parameters="pathfinding_basic" - /> <command name="pathfinding_console" available_in_toybox="false" icon="Command_Pathfinding_Icon" diff --git a/indra/newview/llfloaterpathfindingbasic.cpp b/indra/newview/llfloaterpathfindingbasic.cpp deleted file mode 100644 index 40752352ea..0000000000 --- a/indra/newview/llfloaterpathfindingbasic.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/** -* @file llfloaterpathfindingbasic.cpp -* @author William Todd Stinson -* @brief "Pathfinding basic" floater, allowing for basic freezing and unfreezing of the pathfinding avatar mode. -* -* $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$ -*/ - -#include "llviewerprecompiledheaders.h" -#include "llfloaterpathfindingbasic.h" -#include "llsd.h" -#include "lltextbase.h" -#include "llbutton.h" -#include "llpathfindingmanager.h" - -#include <boost/bind.hpp> - -//--------------------------------------------------------------------------- -// LLFloaterPathfindingBasic -//--------------------------------------------------------------------------- - -BOOL LLFloaterPathfindingBasic::postBuild() -{ - mStatusText = findChild<LLTextBase>("status_label"); - llassert(mStatusText != NULL); - - mUnfreezeLabel = findChild<LLTextBase>("unfreeze_label"); - llassert(mUnfreezeLabel != NULL); - - mUnfreezeButton = findChild<LLButton>("enter_unfrozen_mode"); - llassert(mUnfreezeButton != NULL); - mUnfreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingBasic::onUnfreezeClicked, this)); - - mFreezeLabel = findChild<LLTextBase>("freeze_label"); - llassert(mFreezeLabel != NULL); - - mFreezeButton = findChild<LLButton>("enter_frozen_mode"); - llassert(mFreezeButton != NULL); - mFreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingBasic::onFreezeClicked, this)); - - return LLFloater::postBuild(); -} - -void LLFloaterPathfindingBasic::onOpen(const LLSD& pKey) -{ - LLFloater::onOpen(pKey); - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingBasic::onAgentStateCB, this, _1)); - } - setAgentState(LLPathfindingManager::getInstance()->getAgentState()); -} - -void LLFloaterPathfindingBasic::onClose(bool pIsAppQuitting) -{ - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - - LLFloater::onClose(pIsAppQuitting); -} - -LLFloaterPathfindingBasic::LLFloaterPathfindingBasic(const LLSD& pSeed) - : LLFloater(pSeed), - mStatusText(NULL), - mUnfreezeLabel(NULL), - mUnfreezeButton(NULL), - mFreezeLabel(NULL), - mFreezeButton(NULL), - mAgentStateSlot() -{ -} - -LLFloaterPathfindingBasic::~LLFloaterPathfindingBasic() -{ -} - -void LLFloaterPathfindingBasic::onUnfreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateUnfrozen); -} - -void LLFloaterPathfindingBasic::onFreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateFrozen); -} - -void LLFloaterPathfindingBasic::onAgentStateCB(LLPathfindingManager::EAgentState pAgentState) -{ - setAgentState(pAgentState); -} - -void LLFloaterPathfindingBasic::setAgentState(LLPathfindingManager::EAgentState pAgentState) -{ - static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor"); - LLStyle::Params styleParams; - - switch (pAgentState) - { - case LLPathfindingManager::kAgentStateUnknown : - mStatusText->setVisible(TRUE); - mStatusText->setText((LLStringExplicit)getString("status_querying_state"), styleParams); - break; - case LLPathfindingManager::kAgentStateNotEnabled : - mStatusText->setVisible(TRUE); - styleParams.color = errorColor; - mStatusText->setText((LLStringExplicit)getString("status_pathfinding_not_enabled"), styleParams); - break; - case LLPathfindingManager::kAgentStateError : - mStatusText->setVisible(TRUE); - styleParams.color = errorColor; - mStatusText->setText((LLStringExplicit)getString("status_unable_to_change_state"), styleParams); - break; - default : - mStatusText->setVisible(FALSE); - break; - } - - switch (LLPathfindingManager::getInstance()->getLastKnownNonErrorAgentState()) - { - case LLPathfindingManager::kAgentStateUnknown : - case LLPathfindingManager::kAgentStateNotEnabled : - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateFrozen : - mUnfreezeLabel->setEnabled(TRUE); - mUnfreezeButton->setEnabled(TRUE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateUnfrozen : - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(TRUE); - mFreezeButton->setEnabled(TRUE); - break; - default : - llassert(0); - break; - } -} diff --git a/indra/newview/llfloaterpathfindingbasic.h b/indra/newview/llfloaterpathfindingbasic.h deleted file mode 100644 index 286985c022..0000000000 --- a/indra/newview/llfloaterpathfindingbasic.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file llfloaterpathfindingbasic.h - * @author William Todd Stinson - * @brief "Pathfinding basic" floater, allowing for basic freezing and unfreezing of the pathfinding avatar mode. - * - * $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$ - */ - -#ifndef LL_LLFLOATERPATHFINDINGBASIC_H -#define LL_LLFLOATERPATHFINDINGBASIC_H - -#include "llfloater.h" -#include "llpathfindingmanager.h" - -class LLSD; -class LLTextBase; -class LLButton; - -class LLFloaterPathfindingBasic -: public LLFloater -{ - friend class LLFloaterReg; - -public: - virtual BOOL postBuild(); - virtual void onOpen(const LLSD& pKey); - virtual void onClose(bool pIsAppQuitting); - -protected: - -private: - // Does its own instance management, so clients not allowed - // to allocate or destroy. - LLFloaterPathfindingBasic(const LLSD& pSeed); - virtual ~LLFloaterPathfindingBasic(); - - void onUnfreezeClicked(); - void onFreezeClicked(); - - void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState); - - void setAgentState(LLPathfindingManager::EAgentState pAgentState); - - LLTextBase *mStatusText; - LLTextBase *mUnfreezeLabel; - LLButton *mUnfreezeButton; - LLTextBase *mFreezeLabel; - LLButton *mFreezeButton; - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; -}; - -#endif // LL_LLFLOATERPATHFINDINGBASIC_H diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 54e60ce0f4..eae7aa4bcc 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -64,9 +64,6 @@ #define XUI_CHARACTER_TYPE_C 3 #define XUI_CHARACTER_TYPE_D 4 -#define XUI_EDIT_TAB_INDEX 0 -#define XUI_TEST_TAB_INDEX 1 - #define SET_SHAPE_RENDER_FLAG(_flag,_type) _flag |= (1U << _type) #define CONTROL_NAME_RETRIEVE_NEIGHBOR "RetrieveNeighboringRegion" @@ -138,37 +135,9 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mViewCharactersButton != NULL); mViewCharactersButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onViewCharactersClicked, this)); - mEditTestTabContainer = findChild<LLTabContainer>("edit_test_tab_container"); - llassert(mEditTestTabContainer != NULL); - mEditTestTabContainer->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTabSwitch, this)); - - mEditTab = findChild<LLPanel>("edit_panel"); - llassert(mEditTab != NULL); - mTestTab = findChild<LLPanel>("test_panel"); llassert(mTestTab != NULL); - mUnfreezeLabel = findChild<LLTextBase>("unfreeze_label"); - llassert(mUnfreezeLabel != NULL); - - mUnfreezeButton = findChild<LLButton>("enter_unfrozen_mode"); - llassert(mUnfreezeButton != NULL); - mUnfreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onUnfreezeClicked, this)); - - mLinksetsLabel = findChild<LLTextBase>("edit_linksets_label"); - llassert(mLinksetsLabel != NULL); - - mLinksetsButton = findChild<LLButton>("view_and_edit_linksets"); - llassert(mLinksetsButton != NULL); - mLinksetsButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onViewEditLinksetClicked, this)); - - mFreezeLabel = findChild<LLTextBase>("freeze_label"); - llassert(mFreezeLabel != NULL); - - mFreezeButton = findChild<LLButton>("enter_frozen_mode"); - llassert(mFreezeButton != NULL); - mFreezeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onFreezeClicked, this)); - mPathfindingViewerStatus = findChild<LLTextBase>("pathfinding_viewer_status"); llassert(mPathfindingViewerStatus != NULL); @@ -205,11 +174,6 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mClearPathButton != NULL); mClearPathButton->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onClearPathClicked, this)); - if (LLPathingLib::getInstance() == NULL) - { - LLPathingLib::initSystem(); - } - if (LLPathingLib::getInstance() != NULL) { mPathfindingToolset = new LLToolset(); @@ -246,11 +210,6 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) fillInColorsForNavMeshVisualization(); } - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingConsole::onAgentStateCB, this, _1)); - } - if (!mRegionBoundarySlot.connected()) { mRegionBoundarySlot = LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionBoundaryCross, this)); @@ -266,14 +225,10 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) mPathEventSlot = LLPathfindingPathTool::getInstance()->registerPathEventListener(boost::bind(&LLFloaterPathfindingConsole::onPathEvent, this)); } - setAgentState(LLPathfindingManager::getInstance()->getAgentState()); setDefaultInputs(); updatePathTestStatus(); - if (mEditTestTabContainer->getCurrentPanelIndex() == XUI_TEST_TAB_INDEX) - { - switchIntoTestPathMode(); - } + switchIntoTestPathMode(); } void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting) @@ -295,11 +250,6 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting) mRegionBoundarySlot.disconnect(); } - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - if (mNavMeshZoneSlot.connected()) { mNavMeshZoneSlot.disconnect(); @@ -501,15 +451,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mPathfindingViewerStatus(NULL), mPathfindingSimulatorStatus(NULL), mViewCharactersButton(NULL), - mEditTestTabContainer(NULL), - mEditTab(NULL), mTestTab(NULL), - mUnfreezeLabel(NULL), - mUnfreezeButton(NULL), - mLinksetsLabel(NULL), - mLinksetsButton(NULL), - mFreezeLabel(NULL), - mFreezeButton(NULL), mCtrlClickLabel(), mShiftClickLabel(), mCharacterWidthLabel(), @@ -522,7 +464,6 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mNavMeshZoneSlot(), mNavMeshZone(), mIsNavMeshUpdating(false), - mAgentStateSlot(), mRegionBoundarySlot(), mTeleportFailedSlot(), mPathEventSlot(), @@ -577,35 +518,6 @@ void LLFloaterPathfindingConsole::onViewCharactersClicked() LLFloaterPathfindingCharacters::openCharactersViewer(); } -void LLFloaterPathfindingConsole::onTabSwitch() -{ - if (mEditTestTabContainer->getCurrentPanelIndex() == XUI_TEST_TAB_INDEX) - { - switchIntoTestPathMode(); - } - else - { - switchOutOfTestPathMode(); - } -} - -void LLFloaterPathfindingConsole::onUnfreezeClicked() -{ - mUnfreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateUnfrozen); -} - -void LLFloaterPathfindingConsole::onFreezeClicked() -{ - mFreezeButton->setEnabled(FALSE); - LLPathfindingManager::getInstance()->requestSetAgentState(LLPathfindingManager::kAgentStateFrozen); -} - -void LLFloaterPathfindingConsole::onViewEditLinksetClicked() -{ - LLFloaterPathfindingLinksets::openLinksetsEditor(); -} - void LLFloaterPathfindingConsole::onCharacterWidthSet() { updateCharacterWidth(); @@ -658,11 +570,6 @@ void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENav } } -void LLFloaterPathfindingConsole::onAgentStateCB(LLPathfindingManager::EAgentState pAgentState) -{ - setAgentState(pAgentState); -} - void LLFloaterPathfindingConsole::onRegionBoundaryCross() { initializeNavMeshZoneForCurrentRegion(); @@ -706,7 +613,6 @@ void LLFloaterPathfindingConsole::onPathEvent() void LLFloaterPathfindingConsole::setDefaultInputs() { - mEditTestTabContainer->selectTab(XUI_EDIT_TAB_INDEX); setRenderWorld(TRUE); setRenderNavMesh(FALSE); setRenderWalkables(FALSE); @@ -776,7 +682,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); mShowXRayCheckBox->setEnabled(FALSE); mViewCharactersButton->setEnabled(FALSE); - mEditTestTabContainer->selectTab(0); mTestTab->setEnabled(FALSE); mCtrlClickLabel->setEnabled(FALSE); mShiftClickLabel->setEnabled(FALSE); @@ -802,7 +707,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); mShowXRayCheckBox->setEnabled(FALSE); mViewCharactersButton->setEnabled(TRUE); - mEditTestTabContainer->selectTab(0); mTestTab->setEnabled(FALSE); mCtrlClickLabel->setEnabled(FALSE); mShiftClickLabel->setEnabled(FALSE); @@ -830,7 +734,6 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); mShowXRayCheckBox->setEnabled(FALSE); mViewCharactersButton->setEnabled(TRUE); - mEditTestTabContainer->selectTab(0); mTestTab->setEnabled(FALSE); mCtrlClickLabel->setEnabled(FALSE); mShiftClickLabel->setEnabled(FALSE); @@ -944,39 +847,6 @@ std::string LLFloaterPathfindingConsole::getSimulatorStatusText() const { std::string simulatorStatusText(""); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - if (LLPathfindingManager::getInstance()->isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX()) - { - switch (mNavMeshZone.getNavMeshZoneStatus()) - { - case LLPathfindingNavMeshZone::kNavMeshZonePending : - simulatorStatusText = getString("navmesh_simulator_status_pending"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneBuilding : - simulatorStatusText = getString("navmesh_simulator_status_building"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneSomePending : - simulatorStatusText = getString("navmesh_simulator_status_some_pending"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneSomeBuilding : - simulatorStatusText = getString("navmesh_simulator_status_some_building"); - break; - case LLPathfindingNavMeshZone::kNavMeshZonePendingAndBuilding : - simulatorStatusText = getString("navmesh_simulator_status_pending_and_building"); - break; - case LLPathfindingNavMeshZone::kNavMeshZoneComplete : - simulatorStatusText = getString("navmesh_simulator_status_complete"); - break; - default : - simulatorStatusText = getString("navmesh_simulator_status_unknown"); - break; - } - } - else - { - simulatorStatusText = getString("navmesh_simulator_status_region_not_enabled"); - } -#else // DEPRECATED_UNVERSIONED_NAVMESH switch (mNavMeshZone.getNavMeshZoneStatus()) { case LLPathfindingNavMeshZone::kNavMeshZonePending : @@ -1001,7 +871,6 @@ std::string LLFloaterPathfindingConsole::getSimulatorStatusText() const simulatorStatusText = getString("navmesh_simulator_status_unknown"); break; } -#endif // DEPRECATED_UNVERSIONED_NAVMESH return simulatorStatusText; } @@ -1028,44 +897,6 @@ void LLFloaterPathfindingConsole::cleanupRenderableRestoreItems() } } -void LLFloaterPathfindingConsole::setAgentState(LLPathfindingManager::EAgentState pAgentState) -{ - switch (LLPathfindingManager::getInstance()->getLastKnownNonErrorAgentState()) - { - case LLPathfindingManager::kAgentStateUnknown : - case LLPathfindingManager::kAgentStateNotEnabled : - mEditTab->setEnabled(FALSE); - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mLinksetsLabel->setEnabled(FALSE); - mLinksetsButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateFrozen : - mEditTab->setEnabled(TRUE); - mUnfreezeLabel->setEnabled(TRUE); - mUnfreezeButton->setEnabled(TRUE); - mLinksetsLabel->setEnabled(FALSE); - mLinksetsButton->setEnabled(FALSE); - mFreezeLabel->setEnabled(FALSE); - mFreezeButton->setEnabled(FALSE); - break; - case LLPathfindingManager::kAgentStateUnfrozen : - mEditTab->setEnabled(TRUE); - mUnfreezeLabel->setEnabled(FALSE); - mUnfreezeButton->setEnabled(FALSE); - mLinksetsLabel->setEnabled(TRUE); - mLinksetsButton->setEnabled(TRUE); - mFreezeLabel->setEnabled(TRUE); - mFreezeButton->setEnabled(TRUE); - break; - default : - llassert(0); - break; - } -} - void LLFloaterPathfindingConsole::switchIntoTestPathMode() { if (LLPathingLib::getInstance() != NULL) diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index edbeae2012..2529b241bf 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -31,7 +31,6 @@ #include "llfloater.h" #include "llhandle.h" #include "llpathinglib.h" -#include "llpathfindingmanager.h" #include "llpathfindingnavmeshzone.h" #include "llpathfindingpathtool.h" @@ -43,7 +42,6 @@ class LLSliderCtrl; class LLLineEditor; class LLTextBase; class LLCheckBoxCtrl; -class LLTabContainer; class LLComboBox; class LLButton; class LLToolset; @@ -120,16 +118,11 @@ private: void onShowNavMeshSet(); void onShowWalkabilitySet(); void onViewCharactersClicked(); - void onTabSwitch(); - void onUnfreezeClicked(); - void onFreezeClicked(); - void onViewEditLinksetClicked(); void onCharacterWidthSet(); void onCharacterTypeSwitch(); void onClearPathClicked(); void onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus); - void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState); void onRegionBoundaryCross(); void onPathEvent(); @@ -145,8 +138,6 @@ private: void initializeNavMeshZoneForCurrentRegion(); - void setAgentState(LLPathfindingManager::EAgentState pAgentState); - void switchIntoTestPathMode(); void switchOutOfTestPathMode(); void updateCharacterWidth(); @@ -177,15 +168,7 @@ private: LLTextBase *mPathfindingViewerStatus; LLTextBase *mPathfindingSimulatorStatus; LLButton *mViewCharactersButton; - LLTabContainer *mEditTestTabContainer; - LLPanel *mEditTab; LLPanel *mTestTab; - LLTextBase *mUnfreezeLabel; - LLButton *mUnfreezeButton; - LLTextBase *mLinksetsLabel; - LLButton *mLinksetsButton; - LLTextBase *mFreezeLabel; - LLButton *mFreezeButton; LLTextBase *mCtrlClickLabel; LLTextBase *mShiftClickLabel; LLTextBase *mCharacterWidthLabel; @@ -200,7 +183,6 @@ private: LLPathfindingNavMeshZone mNavMeshZone; bool mIsNavMeshUpdating; - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; boost::signals2::connection mRegionBoundarySlot; boost::signals2::connection mTeleportFailedSlot; LLPathfindingPathTool::path_event_slot_t mPathEventSlot; diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 1d7f165ad9..8488ee1aa3 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -60,26 +60,6 @@ // LLFloaterPathfindingLinksets //--------------------------------------------------------------------------- -void LLFloaterPathfindingLinksets::onOpen(const LLSD& pKey) -{ - LLFloaterPathfindingObjects::onOpen(pKey); - - if (!mAgentStateSlot.connected()) - { - mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingLinksets::onAgentStateChange, this, _1)); - } -} - -void LLFloaterPathfindingLinksets::onClose(bool pIsAppQuitting) -{ - if (mAgentStateSlot.connected()) - { - mAgentStateSlot.disconnect(); - } - - LLFloaterPathfindingObjects::onClose(pIsAppQuitting); -} - void LLFloaterPathfindingLinksets::openLinksetsEditor() { LLFloaterReg::toggleInstanceOrBringToFront("pathfinding_linksets"); @@ -107,8 +87,7 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed) mLabelEditD(NULL), mEditD(NULL), mApplyEditsButton(NULL), - mBeaconColor(), - mAgentStateSlot() + mBeaconColor() { } @@ -337,11 +316,6 @@ void LLFloaterPathfindingLinksets::onApplyChangesClicked() applyEdit(); } -void LLFloaterPathfindingLinksets::onAgentStateChange(LLPathfindingManager::EAgentState pAgentState) -{ - updateControls(); -} - void LLFloaterPathfindingLinksets::applyFilters() { rebuildObjectsScrollList(); @@ -530,7 +504,7 @@ bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLink void LLFloaterPathfindingLinksets::updateStateOnEditFields() { int numSelectedItems = getNumSelectedObjects(); - bool isEditEnabled = ((numSelectedItems > 0) && LLPathfindingManager::getInstance()->isAllowAlterPermanent()); + bool isEditEnabled = (numSelectedItems > 0); mEditLinksetUse->setEnabled(isEditEnabled); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index 4b19f09cda..8c464dc1d5 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -46,10 +46,6 @@ class LLVector3; class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects { public: - - virtual void onOpen(const LLSD& pKey); - virtual void onClose(bool pIsAppQuitting); - static void openLinksetsEditor(); protected: @@ -78,7 +74,6 @@ private: void onClearFiltersClicked(); void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl); void onApplyChangesClicked(); - void onAgentStateChange(LLPathfindingManager::EAgentState pAgentState); void applyFilters(); void clearFilters(); @@ -131,8 +126,6 @@ private: LLButton *mApplyEditsButton; LLColor4 mBeaconColor; - - LLPathfindingManager::agent_state_slot_t mAgentStateSlot; }; #endif // LL_LLFLOATERPATHFINDINGLINKSETS_H diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 15eaac771f..ac1fb15be9 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -47,12 +47,10 @@ LLPathfindingCharacterList::LLPathfindingCharacterList() LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) : LLPathfindingObjectList() { - if ( LLPathingLib::getInstance() == NULL ) + if (LLPathingLib::getInstance() != NULL) { - LLPathingLib::initSystem(); + LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); } - - LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); parseCharacterListData(pCharacterListData); } diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp index 5b321b4408..4cb749b3ca 100644 --- a/indra/newview/llpathfindinglinkset.cpp +++ b/indra/newview/llpathfindinglinkset.cpp @@ -34,19 +34,15 @@ #include "llpathfindingobject.h" #include "llsd.h" -#define LINKSET_LAND_IMPACT_FIELD "landimpact" -#define LINKSET_MODIFIABLE_FIELD "modifiable" -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -#define DEPRECATED_LINKSET_PERMANENT_FIELD "permanent" -#define DEPRECATED_LINKSET_WALKABLE_FIELD "walkable" -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -#define LINKSET_CATEGORY_FIELD "navmesh_category" -#define LINKSET_CAN_BE_VOLUME "can_be_volume" -#define LINKSET_PHANTOM_FIELD "phantom" -#define LINKSET_WALKABILITY_A_FIELD "A" -#define LINKSET_WALKABILITY_B_FIELD "B" -#define LINKSET_WALKABILITY_C_FIELD "C" -#define LINKSET_WALKABILITY_D_FIELD "D" +#define LINKSET_LAND_IMPACT_FIELD "landimpact" +#define LINKSET_MODIFIABLE_FIELD "modifiable" +#define LINKSET_CATEGORY_FIELD "navmesh_category" +#define LINKSET_CAN_BE_VOLUME "can_be_volume" +#define LINKSET_PHANTOM_FIELD "phantom" +#define LINKSET_WALKABILITY_A_FIELD "A" +#define LINKSET_WALKABILITY_B_FIELD "B" +#define LINKSET_WALKABILITY_C_FIELD "C" +#define LINKSET_WALKABILITY_D_FIELD "D" #define LINKSET_CATEGORY_VALUE_INCLUDE 0 #define LINKSET_CATEGORY_VALUE_EXCLUDE 1 @@ -63,9 +59,6 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainData) : LLPathfindingObject(), mIsTerrain(true), mLandImpact(0U), -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable(true), -#endif // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable(FALSE), mCanBeVolume(FALSE), mLinksetUse(kUnknown), @@ -81,9 +74,6 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& : LLPathfindingObject(pUUID, pLinksetData), mIsTerrain(false), mLandImpact(0U), -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable(false), -#endif // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable(TRUE), mCanBeVolume(TRUE), mLinksetUse(kUnknown), @@ -100,12 +90,7 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther) : LLPathfindingObject(pOther), mIsTerrain(pOther.mIsTerrain), mLandImpact(pOther.mLandImpact), -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable(pOther.mHasModifiable), - mIsModifiable(pOther.mHasModifiable ? pOther.mIsModifiable : TRUE), -#else // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable(pOther.mIsModifiable), -#endif // MISSING_MODIFIABLE_FIELD_WAR mCanBeVolume(pOther.mCanBeVolume), mLinksetUse(pOther.mLinksetUse), mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA), @@ -125,15 +110,7 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse mIsTerrain = pOther.mIsTerrain; mLandImpact = pOther.mLandImpact; -#ifdef MISSING_MODIFIABLE_FIELD_WAR - if (pOther.mHasModifiable) - { - mHasModifiable = pOther.mHasModifiable; - mIsModifiable = pOther.mIsModifiable; - } -#else // MISSING_MODIFIABLE_FIELD_WAR mIsModifiable = pOther.mIsModifiable; -#endif // MISSING_MODIFIABLE_FIELD_WAR mCanBeVolume = pOther.mCanBeVolume; mLinksetUse = pOther.mLinksetUse; mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA; @@ -179,10 +156,6 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, itemData[LINKSET_PHANTOM_FIELD] = static_cast<bool>(isPhantom(pLinksetUse)); } -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - itemData[DEPRECATED_LINKSET_PERMANENT_FIELD] = static_cast<bool>(isPermanent(pLinksetUse)); - itemData[DEPRECATED_LINKSET_WALKABLE_FIELD] = static_cast<bool>(isWalkable(pLinksetUse)); -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS itemData[LINKSET_CATEGORY_FIELD] = convertCategoryToLLSD(getNavMeshGenerationCategory(pLinksetUse)); } @@ -216,18 +189,9 @@ void LLPathfindingLinkset::parseLinksetData(const LLSD &pLinksetData) llassert(pLinksetData.get(LINKSET_LAND_IMPACT_FIELD).asInteger() >= 0); mLandImpact = pLinksetData.get(LINKSET_LAND_IMPACT_FIELD).asInteger(); -#ifdef MISSING_MODIFIABLE_FIELD_WAR - mHasModifiable = pLinksetData.has(LINKSET_MODIFIABLE_FIELD); - if (mHasModifiable) - { - llassert(pLinksetData.get(LINKSET_MODIFIABLE_FIELD).isBoolean()); - mIsModifiable = pLinksetData.get(LINKSET_MODIFIABLE_FIELD).asBoolean(); - } -#else // MISSING_MODIFIABLE_FIELD_WAR llassert(pLinksetData.has(LINKSET_MODIFIABLE_FIELD)); llassert(pLinksetData.get(LINKSET_MODIFIABLE_FIELD).isBoolean()); mIsModifiable = pLinksetData.get(LINKSET_MODIFIABLE_FIELD).asBoolean(); -#endif // MISSING_MODIFIABLE_FIELD_WAR } void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) @@ -239,27 +203,8 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) isPhantom = pLinksetData.get(LINKSET_PHANTOM_FIELD).asBoolean(); } -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - if (pLinksetData.has(LINKSET_CATEGORY_FIELD)) - { - mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(LINKSET_CATEGORY_FIELD))); - } - else - { - llassert(pLinksetData.has(DEPRECATED_LINKSET_PERMANENT_FIELD)); - llassert(pLinksetData.get(DEPRECATED_LINKSET_PERMANENT_FIELD).isBoolean()); - bool isPermanent = pLinksetData.get(DEPRECATED_LINKSET_PERMANENT_FIELD).asBoolean(); - - llassert(pLinksetData.has(DEPRECATED_LINKSET_WALKABLE_FIELD)); - llassert(pLinksetData.get(DEPRECATED_LINKSET_WALKABLE_FIELD).isBoolean()); - bool isWalkable = pLinksetData.get(DEPRECATED_LINKSET_WALKABLE_FIELD).asBoolean(); - - mLinksetUse = getLinksetUse(isPhantom, isPermanent, isWalkable); - } -#else // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS llassert(pLinksetData.has(LINKSET_CATEGORY_FIELD)); mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(LINKSET_CATEGORY_FIELD))); -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS if (pLinksetData.has(LINKSET_CAN_BE_VOLUME)) { @@ -292,66 +237,6 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE); } -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable) -{ - return (pIsPhantom ? (pIsPermanent ? (pIsWalkable ? kMaterialVolume : kExclusionVolume) : kDynamicPhantom) : - (pIsPermanent ? (pIsWalkable ? kWalkable : kStaticObstacle) : kDynamicObstacle)); -} - -BOOL LLPathfindingLinkset::isPermanent(ELinksetUse pLinksetUse) -{ - BOOL retVal; - - switch (pLinksetUse) - { - case kWalkable : - case kStaticObstacle : - case kMaterialVolume : - case kExclusionVolume : - retVal = true; - break; - case kDynamicObstacle : - case kDynamicPhantom : - retVal = false; - break; - case kUnknown : - default : - retVal = false; - llassert(0); - break; - } - - return retVal; -} - -BOOL LLPathfindingLinkset::isWalkable(ELinksetUse pLinksetUse) -{ - BOOL retVal; - - switch (pLinksetUse) - { - case kWalkable : - case kMaterialVolume : - retVal = true; - break; - case kStaticObstacle : - case kDynamicObstacle : - case kExclusionVolume : - case kDynamicPhantom : - retVal = false; - break; - case kUnknown : - default : - retVal = false; - llassert(0); - break; - } - - return retVal; -} -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - BOOL LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse) { BOOL retVal; diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index a598452ea5..03c526560c 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -32,9 +32,6 @@ #include "llpathfindingobject.h" -#define DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS -#define MISSING_MODIFIABLE_FIELD_WAR - class LLSD; class LLPathfindingLinkset : public LLPathfindingObject @@ -92,11 +89,6 @@ private: void parseLinksetData(const LLSD &pLinksetData); void parsePathfindingData(const LLSD &pLinksetData); -#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS - static ELinksetUse getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable); - static BOOL isPermanent(ELinksetUse pLinksetUse); - static BOOL isWalkable(ELinksetUse pLinksetUse); -#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS static BOOL isPhantom(ELinksetUse pLinksetUse); static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory); static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse); @@ -105,9 +97,6 @@ private: bool mIsTerrain; U32 mLandImpact; -#ifdef MISSING_MODIFIABLE_FIELD_WAR - bool mHasModifiable; -#endif // MISSING_MODIFIABLE_FIELD_WAR BOOL mIsModifiable; BOOL mCanBeVolume; ELinksetUse mLinksetUse; diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index e282a3e2f4..1c3800eed6 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -45,6 +45,7 @@ #include "llpathfindingnavmesh.h" #include "llpathfindingnavmeshstatus.h" #include "llpathfindingobject.h" +#include "llpathinglib.h" #include "llsingleton.h" #include "llsd.h" #include "lltrans.h" @@ -273,6 +274,14 @@ LLPathfindingManager::~LLPathfindingManager() { } +void LLPathfindingManager::initSystem() +{ + if (LLPathingLib::getInstance() == NULL) + { + LLPathingLib::initSystem(); + } +} + bool LLPathfindingManager::isPathfindingEnabledForCurrentRegion() const { return isPathfindingEnabledForRegion(getCurrentRegion()); @@ -284,17 +293,9 @@ bool LLPathfindingManager::isPathfindingEnabledForRegion(LLViewerRegion *pRegion return !retrieveNavMeshURL.empty(); } -#ifdef DEPRECATED_UNVERSIONED_NAVMESH -bool LLPathfindingManager::isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const +bool LLPathfindingManager::isPathfindingDebugEnabled() const { - std::string navMeshStatusURL = getNavMeshStatusURLForRegion(getCurrentRegion()); - return !navMeshStatusURL.empty(); -} -#endif // DEPRECATED_UNVERSIONED_NAVMESH - -bool LLPathfindingManager::isAllowAlterPermanent() -{ - return (!isPathfindingEnabledForCurrentRegion() || (getAgentState() == kAgentStateUnfrozen)); + return (LLPathingLib::getInstance() != NULL); } bool LLPathfindingManager::isAllowViewTerrainProperties() const @@ -329,25 +330,10 @@ void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion) else { std::string navMeshStatusURL = getNavMeshStatusURLForRegion(pRegion); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - if (navMeshStatusURL.empty()) - { - LLPathfindingNavMeshStatus navMeshStatus = navMeshPtr->getNavMeshStatusXXX(); - navMeshStatus.incrementNavMeshVersionXXX(); - sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, navMeshStatus); - } - else - { - navMeshPtr->handleNavMeshCheckVersion(); - LLHTTPClient::ResponderPtr navMeshStatusResponder = new NavMeshStatusResponder(navMeshStatusURL, pRegion); - LLHTTPClient::get(navMeshStatusURL, navMeshStatusResponder); - } -#else // DEPRECATED_UNVERSIONED_NAVMESH llassert(!navMeshStatusURL.empty()); navMeshPtr->handleNavMeshCheckVersion(); LLHTTPClient::ResponderPtr navMeshStatusResponder = new NavMeshStatusResponder(navMeshStatusURL, pRegion); LLHTTPClient::get(navMeshStatusURL, navMeshStatusResponder); -#endif // DEPRECATED_UNVERSIONED_NAVMESH } } diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index 3c9af91e7b..3aafef3565 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -74,13 +74,13 @@ public: LLPathfindingManager(); virtual ~LLPathfindingManager(); + void initSystem(); + bool isPathfindingEnabledForCurrentRegion() const; bool isPathfindingEnabledForRegion(LLViewerRegion *pRegion) const; -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - bool isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const; -#endif // DEPRECATED_UNVERSIONED_NAVMESH - bool isAllowAlterPermanent(); + bool isPathfindingDebugEnabled() const; + bool isAllowViewTerrainProperties() const; LLPathfindingNavMesh::navmesh_slot_t registerNavMeshListenerForRegion(LLViewerRegion *pRegion, LLPathfindingNavMesh::navmesh_callback_t pNavMeshCallback); diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h index 55fdd9aaa7..02b403ab75 100644 --- a/indra/newview/llpathfindingnavmesh.h +++ b/indra/newview/llpathfindingnavmesh.h @@ -66,10 +66,6 @@ public: navmesh_slot_t registerNavMeshListener(navmesh_callback_t pNavMeshCallback); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - const LLPathfindingNavMeshStatus &getNavMeshStatusXXX() const {return mNavMeshStatus;}; -#endif // DEPRECATED_UNVERSIONED_NAVMESH - bool hasNavMeshVersion(const LLPathfindingNavMeshStatus &pNavMeshStatus) const; void handleNavMeshWaitForRegionLoad(); diff --git a/indra/newview/llpathfindingnavmeshstatus.h b/indra/newview/llpathfindingnavmeshstatus.h index 6428a31c24..837fc43cc5 100644 --- a/indra/newview/llpathfindingnavmeshstatus.h +++ b/indra/newview/llpathfindingnavmeshstatus.h @@ -32,9 +32,6 @@ #include <string> -// XXX stinson 03/12/2012 : This definition is in place to support an older version of the pathfinding simulator that does not have versioned information -#define DEPRECATED_UNVERSIONED_NAVMESH - class LLSD; class LLPathfindingNavMeshStatus @@ -57,10 +54,6 @@ public: LLPathfindingNavMeshStatus &operator =(const LLPathfindingNavMeshStatus &pOther); -#ifdef DEPRECATED_UNVERSIONED_NAVMESH - void incrementNavMeshVersionXXX() {++mVersion;}; -#endif // DEPRECATED_UNVERSIONED_NAVMESH - bool isValid() const {return mIsValid;}; const LLUUID &getRegionUUID() const {return mRegionUUID;}; U32 getVersion() const {return mVersion;}; diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h index 8c330559a9..1e92f6b131 100644 --- a/indra/newview/llpathfindingnavmeshzone.h +++ b/indra/newview/llpathfindingnavmeshzone.h @@ -32,6 +32,7 @@ #include "lluuid.h" #include "llpathfindingnavmesh.h" #include "llpathfindingnavmeshstatus.h" +#include "llviewerregion.h" #include <vector> diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index bc5a265111..5567869a1c 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -54,11 +54,6 @@ LLPathfindingPathTool::LLPathfindingPathTool() mIsMiddleMouseButtonHeld(false), mIsRightMouseButtonHeld(false) { - if (!LLPathingLib::getInstance()) - { - LLPathingLib::initSystem(); - } - setCharacterWidth(1.0f); setCharacterType(mCharacterType); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0ac8c1fe39..6bee373181 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -186,6 +186,7 @@ #include "llappearancemgr.h" #include "llavatariconctrl.h" #include "llvoicechannel.h" +#include "llpathfindingmanager.h" #include "lllogin.h" #include "llevents.h" @@ -1968,6 +1969,9 @@ bool idle_startup() } } + llassert(LLPathfindingManager::getInstance() != NULL); + LLPathfindingManager::getInstance()->initSystem(); + display_startup(); //DEV-17797. get null folder. Any items found here moved to Lost and Found LLInventoryModelBackgroundFetch::instance().findLostItems(); diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index a963ef2ea6..8c5b534d63 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -247,12 +247,6 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() } } - if (!gAgent.isGodlike() && !gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") && !LLPathfindingManager::getInstance()->isAllowAlterPermanent()) - { - alertNoTerraformWhileFrozen(); - return; - } - for(region_list_t::iterator iter = mLastAffectedRegions.begin(); iter != mLastAffectedRegions.end(); ++iter) { @@ -389,12 +383,6 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } - if (!gAgent.isGodlike() && !gSavedSettings.getBOOL("PathfindingDisablePermanentObjects") && !LLPathfindingManager::getInstance()->isAllowAlterPermanent()) - { - alertNoTerraformWhileFrozen(); - return TRUE; - } - LLVector3 pos_region = region_position.getPositionRegion(); U32 grids = regionp->getLand().mGridsPerEdge; S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids ); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 12f802b29a..6b7b67dab9 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -84,7 +84,6 @@ #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" -#include "llfloaterpathfindingbasic.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" #include "llfloaterpathfindingconsole.h" @@ -247,7 +246,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>); LLFloaterPayUtil::registerFloater(); - LLFloaterReg::add("pathfinding_basic", "floater_pathfinding_basic.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingBasic>); LLFloaterReg::add("pathfinding_characters", "floater_pathfinding_characters.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingCharacters>); LLFloaterReg::add("pathfinding_linksets", "floater_pathfinding_linksets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingLinksets>); LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingConsole>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6944ae1a9b..69421d240b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4802,15 +4802,15 @@ class LLToolsEnablePathfinding : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); + return (LLPathfindingManager::getInstance() != NULL) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); } }; -class LLToolsEnablePathfindingLinksets : public view_listener_t +class LLToolsEnablePathfindingDebug : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isAllowAlterPermanent(); + return (LLPathfindingManager::getInstance() != NULL) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isPathfindingDebugEnabled(); } }; @@ -8209,7 +8209,7 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); - view_listener_t::addMenu(new LLToolsEnablePathfindingLinksets(), "Tools.EnablePathfindingLinksets"); + view_listener_t::addMenu(new LLToolsEnablePathfindingDebug(), "Tools.EnablePathfindingDebug"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index bfde167f18..2c4392ad33 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5304,7 +5304,7 @@ void LLViewerObject::markForUpdate(BOOL priority) bool LLViewerObject::isPermanentEnforced() const { - return flagObjectPermanent() && !LLPathfindingManager::getInstance()->isAllowAlterPermanent() && !gAgent.isGodlike(); + return flagObjectPermanent() && (mRegionp != gAgent.getRegion()) && !gAgent.isGodlike(); } bool LLViewerObject::getIncludeInSearch() const diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 1b104bb766..0426fa9977 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -142,7 +142,6 @@ with the same filename but different name <texture name="Command_Outbox_Icon" file_name="toolbar_icons/outbox.png" preload="true" /> <texture name="Command_Pathfinding_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" /> - <texture name="Command_PF_Basic_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_PF_Characters_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_PF_Linksets_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" /> diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml deleted file mode 100644 index 7af40bbff6..0000000000 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_basic.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - open_positioning="cascading" - can_tear_off="false" - height="213" - layout="topleft" - name="floater_pathfinding_basic" - help_topic="floater_pathfinding_basic" - reuse_instance="false" - save_rect="false" - single_instance="true" - title="Basic pathfinding setup" - width="312"> - <floater.string name="status_pathfinding_not_enabled">This region is not enabled for pathfinding.</floater.string> - <floater.string name="status_unable_to_change_state">Unable to change modes successfully.</floater.string> - <floater.string name="status_querying_state">Checking status ...</floater.string> - <text - height="13" - word_wrap="false" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - left="15" - name="status_label" - top="8" - width="289"> - </text> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - left="15" - name="unfreeze_label" - top_pad="4" - width="289"> - Allow object / terrain changes: - </text> - <button - follows="left|top" - height="22" - label="Unfreeze" - layout="topleft" - name="enter_unfrozen_mode" - width="116"/> - <text - height="82" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - line_spacing.multiple="1.5" - left="15" - name="freeze_label" - top_pad="23" - width="289"> - In unfrozen mode, you can move and make changes to objects and terrain. When you are finished, click the Freeze button. It may require a few minutes to process your changes. - </text> - <button - follows="left|top" - height="22" - label="Freeze" - layout="topleft" - name="enter_frozen_mode" - top_pad="0" - width="116"/> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml index 54d44be015..59b816b0e1 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -9,7 +9,7 @@ reuse_instance="true" save_rect="true" single_instance="true" - title="Pathfinding edit / test" + title="Pathfinding debug" width="456"> <floater.string name="navmesh_viewer_status_unknown"></floater.string> <floater.string name="navmesh_viewer_status_library_not_implemented">Cannot find pathing library implementation.</floater.string> @@ -21,7 +21,6 @@ <floater.string name="navmesh_viewer_status_has_navmesh">Latest navmesh has been downloaded.</floater.string> <floater.string name="navmesh_viewer_status_error">Unable to download navmesh successfully.</floater.string> <floater.string name="navmesh_simulator_status_unknown"></floater.string> - <floater.string name="navmesh_simulator_status_region_not_enabled">This region does not expose the navmesh status.</floater.string> <floater.string name="navmesh_simulator_status_pending">Navmesh has pending changes.</floater.string> <floater.string name="navmesh_simulator_status_building">Navmesh is building.</floater.string> <floater.string name="navmesh_simulator_status_some_pending">Some navmesh regions have pending changes.</floater.string> @@ -238,96 +237,9 @@ bevel_style="none" follows="left|top" layout="topleft" - name="edit_panel" - left="1" - label="Edit"> - <text - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - name="unfreeze_label" - left="16" - top_pad="16" - height="13" - width="190"> - Allow object / terrain changes: - </text> - <button - follows="left|top" - height="22" - left="16" - enabled="false" - label="Unfreeze" - layout="topleft" - name="enter_unfrozen_mode" - top_pad="5" - width="116"/> - <text - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - left="16" - name="edit_linksets_label" - top_pad="23" - height="13" - width="190"> - Edit linkset attributes: - </text> - <button - follows="left|top" - height="22" - left="16" - label="Linksets..." - layout="topleft" - name="view_and_edit_linksets" - top_pad="5" - width="116"/> - <text - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - text_readonly_color="LabelDisabledColor" - length="1" - follows="left|top" - layout="topleft" - left="16" - line_spacing.multiple="1.5" - name="freeze_label" - top_pad="23" - height="32" - width="190"> - Prevent object / terrain changes and update the navmesh: - </text> - <button - follows="left|top" - height="22" - left="16" - enabled="false" - label="Freeze" - layout="topleft" - name="enter_frozen_mode" - top_pad="3" - width="116"/> - </panel> - <panel - border="false" - bevel_style="none" - follows="left|top" - layout="topleft" left="1" name="test_panel" - label="Test"> + label="Test path"> <text height="14" word_wrap="true" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ad02beff7a..ecc96ab402 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -943,31 +943,13 @@ name="Pathfinding" tear_off="false"> <menu_item_call - label="Basic setup..." - name="pathfinding_basic_menu_item"> - <menu_item_call.on_click - function="Floater.ToggleOrBringToFront" - parameter="pathfinding_basic" /> - <menu_item_call.on_enable - function="Tools.EnablePathfinding" /> - </menu_item_call> - <menu_item_call - label="Edit / test..." - name="pathfinding_console_menu_item"> - <menu_item_call.on_click - function="Floater.ToggleOrBringToFront" - parameter="pathfinding_console" /> - <menu_item_call.on_enable - function="Tools.EnablePathfinding" /> - </menu_item_call> - <menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"> <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="pathfinding_linksets" /> <menu_item_call.on_enable - function="Tools.EnablePathfindingLinksets" /> + function="Tools.EnablePathfinding" /> </menu_item_call> <menu_item_call label="Characters..." @@ -978,6 +960,15 @@ <menu_item_call.on_enable function="Tools.EnablePathfinding" /> </menu_item_call> + <menu_item_call + label="Pathfinding debug..." + name="pathfinding_console_menu_item"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="pathfinding_console" /> + <menu_item_call.on_enable + function="Tools.EnablePathfindingDebug" /> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 15963af960..e6af4cf5a6 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3832,7 +3832,6 @@ Try enclosing path to the editor with double quotes. <string name="Command_Outbox_Label">Merchant outbox</string> <string name="Command_Pathfinding_Label">Pathfinding</string> <string name="Command_People_Label">People</string> - <string name="Command_PF_Basic_Label">Pathfinding Basic</string> <string name="Command_PF_Characters_Label">Pathfinding Characters</string> <string name="Command_PF_Linksets_Label">Pathfinding Linksets</string> <string name="Command_Picks_Label">Picks</string> @@ -3862,7 +3861,6 @@ Try enclosing path to the editor with double quotes. <string name="Command_Outbox_Tooltip">Transfer items to your marketplace for sale</string> <string name="Command_Pathfinding_Tooltip">Information about pathfinding</string> <string name="Command_People_Tooltip">Friends, groups, and nearby people</string> - <string name="Command_PF_Basic_Tooltip">Manipulation of pathfinding frozen/unfrozen state</string> <string name="Command_PF_Characters_Tooltip">Manipulation of pathfinding characters</string> <string name="Command_PF_Linksets_Tooltip">Manipulation of pathfinding linksets</string> <string name="Command_Picks_Tooltip">Places to show as favorites in your profile</string> |