summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml12
-rw-r--r--hack-to-rebuild-team-city.txt1
-rw-r--r--indra/llrender/llrendernavprim.cpp97
-rw-r--r--indra/llrender/llrendernavprim.h74
-rw-r--r--indra/newview/CMakeLists.txt5
-rw-r--r--indra/newview/app_settings/cmd_line.xml22
-rw-r--r--indra/newview/app_settings/commands.xml30
-rw-r--r--indra/newview/app_settings/settings.xml44
-rwxr-xr-xindra/newview/llagent.cpp6
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.cpp60
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.h25
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp77
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h74
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp46
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h101
-rw-r--r--indra/newview/llfloaterpathfindingobjects.cpp61
-rw-r--r--indra/newview/llfloaterpathfindingobjects.h3
-rw-r--r--indra/newview/llmoveview.cpp2
-rw-r--r--indra/newview/llpanelnavmeshrebake.h97
-rw-r--r--indra/newview/llpanelobject.cpp2
-rw-r--r--indra/newview/llpanelpathfindingrebakenavmesh.cpp (renamed from indra/newview/llpanelnavmeshrebake.cpp)144
-rw-r--r--indra/newview/llpanelpathfindingrebakenavmesh.h95
-rw-r--r--indra/newview/llpathfindingcharacter.cpp53
-rw-r--r--indra/newview/llpathfindingcharacter.h55
-rw-r--r--indra/newview/llpathfindingcharacterlist.cpp51
-rw-r--r--indra/newview/llpathfindingcharacterlist.h51
-rw-r--r--indra/newview/llpathfindinglinkset.cpp51
-rw-r--r--indra/newview/llpathfindinglinkset.h51
-rw-r--r--indra/newview/llpathfindinglinksetlist.cpp51
-rw-r--r--indra/newview/llpathfindinglinksetlist.h51
-rw-r--r--indra/newview/llpathfindingmanager.cpp101
-rw-r--r--indra/newview/llpathfindingmanager.h63
-rw-r--r--indra/newview/llpathfindingnavmesh.cpp64
-rw-r--r--indra/newview/llpathfindingnavmesh.h59
-rw-r--r--indra/newview/llpathfindingnavmeshstatus.cpp59
-rw-r--r--indra/newview/llpathfindingnavmeshstatus.h55
-rw-r--r--indra/newview/llpathfindingnavmeshzone.cpp78
-rw-r--r--indra/newview/llpathfindingnavmeshzone.h67
-rw-r--r--indra/newview/llpathfindingobject.cpp13
-rw-r--r--indra/newview/llpathfindingobject.h8
-rw-r--r--indra/newview/llpathfindingobjectlist.h1
-rw-r--r--indra/newview/llpathfindingpathtool.cpp62
-rw-r--r--indra/newview/llpathfindingpathtool.h59
-rw-r--r--indra/newview/lltoolbrush.cpp1
-rw-r--r--indra/newview/llviewerdisplay.cpp1
-rw-r--r--indra/newview/llviewermenu.cpp6
-rw-r--r--indra/newview/llviewernetwork.cpp30
-rw-r--r--indra/newview/llviewernetwork.h5
-rw-r--r--indra/newview/llviewerobject.cpp1
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/skins/default/textures/textures.xml3
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml36
-rw-r--r--indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml25
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml8
-rw-r--r--indra/newview/tests/llagentaccess_test.cpp60
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp3
-rw-r--r--indra/newview/tests/llslurl_test.cpp4
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp8
60 files changed, 1208 insertions, 1186 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 55b8a7f435..d31235e6d3 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1110,9 +1110,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>9a37d0201667a971887604f171394966</string>
+ <string>96dba4139682980285103586e3e2b981</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260580/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120625.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260794/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120627.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1122,9 +1122,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>5600a7849a6bc00cfe08baa5bc251efd</string>
+ <string>140b9c68ac84c0e2cf40e22e3c5695f4</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260580/arch/Linux/installer/llphysicsextensions-0.1-linux-20120626.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260794/arch/Linux/installer/llphysicsextensions-0.1-linux-20120628.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -1134,9 +1134,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>bfcfb9bc885e46a1b97f8f91cf5d5fd1</string>
+ <string>f1af9983fa482e09a4c4d9b4b1ea6492</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260580/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120625.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260794/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120627.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/hack-to-rebuild-team-city.txt b/hack-to-rebuild-team-city.txt
deleted file mode 100644
index 5c788c060a..0000000000
--- a/hack-to-rebuild-team-city.txt
+++ /dev/null
@@ -1 +0,0 @@
-Thu Mar 15 08:46:27 PDT 2012
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index c24a09028f..ca72964832 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -1,67 +1,43 @@
/**
- * @file LLRenderNavPrim.cpp
- * @brief Renderable primitives used by the pathing library
- *
- * $LicenseInfo:firstyear=2001&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 llrendernavprim.cpp
+* @brief Implementation of llrendernavprim
+* @author Prep@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 "linden_common.h"
+
#include "llrendernavprim.h"
-#include "llerror.h"
-#include "llglheaders.h"
+
+#include "llrender.h"
#include "llvertexbuffer.h"
-#include "llglslshader.h"
+#include "v4coloru.h"
+#include "v3math.h"
//=============================================================================
LLRenderNavPrim gRenderNav;
//=============================================================================
-void LLRenderNavPrim::renderLLSegment( const LLVector3& start, const LLVector3& end, const LLColor4U& color ) const
-{
- LLColor4 colorA( color );
- gGL.color3fv( colorA.mV );
-
- gGL.begin(LLRender::LINES);
- {
- gGL.vertex3fv( start.mV );
- gGL.vertex3fv( end.mV );
- }
- gGL.end();
-}
-//=============================================================================
-void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const
-{
- LLColor4 colorA( color );
- colorA*=1.25f;
- gGL.color4fv( colorA.mV );
- gGL.begin(LLRender::TRIANGLES);
- {
- gGL.vertex3fv( a.mV );
- gGL.vertex3fv( b.mV );
- gGL.vertex3fv( c.mV );
- }
- gGL.end();
-}
-//=============================================================================
void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
{
LLColor4 cV(color);
@@ -81,16 +57,3 @@ void LLRenderNavPrim::renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertC
pVBO->drawArrays( mode, 0, vertCnt );
}
//=============================================================================
-void LLRenderNavPrim::renderStar( const LLVector3& center, const float scale, const LLColor4U& color ) const
-{
- for (int k=0; k<3; k++)
- {
- LLVector3 star, pt1, pt2;
- star = LLVector3( 0.0f,0.0f,0.0f);
- star[k] = 0.5f;
- pt1 = center + star;
- pt2 = center - star;
- renderLLSegment( pt1, pt2, color );
- }
-}
-//=============================================================================
diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h
index eb45e259d2..a3a5dfec3a 100644
--- a/indra/llrender/llrendernavprim.h
+++ b/indra/llrender/llrendernavprim.h
@@ -1,59 +1,49 @@
/**
- * @file LLRenderNavPrim.h
- * @brief
- *
- * $LicenseInfo:firstyear=2001&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 llrendernavprim.h
+* @brief Header file for llrendernavprim
+* @author Prep@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$
+*/
+#ifndef LL_LLRENDERNAVPRIM_H
+#define LL_LLRENDERNAVPRIM_H
-#ifndef LL_RENDER_NAVPRIM_H
-#define LL_RENDER_NAVPRIM_H
+#include "stdtypes.h"
-#include "llmath.h"
-#include "v3math.h"
-#include "v4math.h"
-#include "m3math.h"
-#include "m4math.h"
-#include "v4color.h"
-#include "llgl.h"
+class LLColor4U;
+class LLVector3;
+class LLVertexBuffer;
class LLRenderNavPrim
{
public:
- //Draw a line
- void renderLLSegment( const LLVector3& start, const LLVector3& end, const LLColor4U& color ) const;
- //Draw simple tri
- void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const;
//Draw simple tri
void renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const;
//Draw the contents of vertex buffer
void renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt );
- //Draw a star
- void renderStar( const LLVector3& center, const float scale, const LLColor4U& color ) const;
- //Flush the device
- void flushDevice() { gGL.flush(); }
private:
};
extern LLRenderNavPrim gRenderNav;
-#endif
+#endif // LL_LLRENDERNAVPRIM_H
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index ac0b0c0351..c91d276c8f 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -382,13 +382,13 @@ set(viewer_SOURCE_FILES
llpanelmediasettingspermissions.cpp
llpanelmediasettingssecurity.cpp
llpanelme.cpp
- llpanelnavmeshrebake.cpp
llpanelnearbymedia.cpp
llpanelobject.cpp
llpanelobjectinventory.cpp
llpanelonlinestatus.cpp
llpaneloutfitedit.cpp
llpaneloutfitsinventory.cpp
+ llpanelpathfindingrebakenavmesh.cpp
llpanelpeople.cpp
llpanelpeoplemenus.cpp
llpanelpermissions.cpp
@@ -950,13 +950,13 @@ set(viewer_HEADER_FILES
llpanelmediasettingspermissions.h
llpanelmediasettingssecurity.h
llpanelme.h
- llpanelnavmeshrebake.h
llpanelnearbymedia.h
llpanelobject.h
llpanelobjectinventory.h
llpanelonlinestatus.h
llpaneloutfitedit.h
llpaneloutfitsinventory.h
+ llpanelpathfindingrebakenavmesh.h
llpanelpeople.h
llpanelpeoplemenus.h
llpanelpermissions.h
@@ -1781,7 +1781,6 @@ endif (WINDOWS)
# To work around this, higher level modules should be listed before the modules
# that they depend upon. -brad
target_link_libraries(${VIEWER_BINARY_NAME}
- ${LLPATHING_LIBRARIES}
${UPDATER_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
${LLAUDIO_LIBRARIES}
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 2853c7383d..711191128b 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -164,28 +164,6 @@
<string>UserLoginInfo</string>
</map>
- <key>loginpage</key>
- <map>
- <key>desc</key>
- <string>Login authentication page to use.</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>LoginPage</string>
- </map>
-
- <key>loginuri</key>
- <map>
- <key>desc</key>
- <string>login server and CGI script to use</string>
- <key>count</key>
- <integer>1</integer>
- <key>compose</key>
- <boolean>true</boolean>
- <key>map-to</key>
- <string>CmdLineLoginURI</string>
- </map>
-
<key>logmetrics</key>
<map>
<key>desc</key>
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index cb6bdc627f..73df064ab2 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -157,36 +157,6 @@
is_running_function="Floater.IsOpen"
is_running_parameters="people"
/>
- <command name="pathfinding_console"
- available_in_toybox="false"
- icon="Command_Pathfinding_Icon"
- label_ref="Command_Pathfinding_Label"
- tooltip_ref="Command_Pathfinding_Tooltip"
- execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="pathfinding_console"
- is_running_function="Floater.IsOpen"
- is_running_parameters="pathfinding_console"
- />
- <command name="pathfinding_characters"
- available_in_toybox="false"
- icon="Command_PF_Characters_Icon"
- label_ref="Command_PF_Characters_Label"
- tooltip_ref="Command_PF_Characters_Tooltip"
- execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="pathfinding_characters"
- is_running_function="Floater.IsOpen"
- is_running_parameters="pathfinding_characters"
- />
- <command name="pathfinding_linksets"
- available_in_toybox="false"
- icon="Command_PF_Linksets_Icon"
- label_ref="Command_PF_Linksets_Label"
- tooltip_ref="Command_PF_Linksets_Tooltip"
- execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="pathfinding_linksets"
- is_running_function="Floater.IsOpen"
- is_running_parameters="pathfinding_linksets"
- />
<command name="picks"
available_in_toybox="true"
icon="Command_Picks_Icon"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f144e9f007..0f3ae89fa8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13595,10 +13595,10 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>RetrieveNeighboringRegion</key>
+ <key>PathfindingRetrieveNeighboringRegion</key>
<map>
<key>Comment</key>
- <string>Download a neighboring region when visualize a navmesh (default val 99 is for the current region).</string>
+ <string>Download a neighboring region when visualizing a pathfinding navmesh (default val 99 means do not download neighbors).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -13609,7 +13609,7 @@
<key>PathfindingNavMeshClear</key>
<map>
<key>Comment</key>
- <string>Background color</string>
+ <string>Background color when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13625,7 +13625,7 @@
<key>PathfindingWalkable</key>
<map>
<key>Comment</key>
- <string>Walkable color</string>
+ <string>Color of walkable objects when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13641,7 +13641,7 @@
<key>PathfindingObstacle</key>
<map>
<key>Comment</key>
- <string>Obstacle color</string>
+ <string>Color of static obstacle objects when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13657,7 +13657,7 @@
<key>PathfindingMaterial</key>
<map>
<key>Comment</key>
- <string>Material volume color</string>
+ <string>Color of material volumes when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13673,7 +13673,7 @@
<key>PathfindingExclusion</key>
<map>
<key>Comment</key>
- <string>Exclusion volume color</string>
+ <string>Color of exclusion volumes when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13689,7 +13689,7 @@
<key>PathfindingConnectedEdge</key>
<map>
<key>Comment</key>
- <string>Connected edge color</string>
+ <string>Color of a connected (crossable) edge when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13705,7 +13705,7 @@
<key>PathfindingBoundaryEdge</key>
<map>
<key>Comment</key>
- <string>Boundary edge color</string>
+ <string>Color of a boundary (non-crossable) edge when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13721,7 +13721,7 @@
<key>PathfindingHeatColorBase</key>
<map>
<key>Comment</key>
- <string>Least walkable heat map color</string>
+ <string>Color of the least walkable value when displaying the pathfinding navmesh as a heatmap.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13737,7 +13737,7 @@
<key>PathfindingHeatColorMax</key>
<map>
<key>Comment</key>
- <string>Most walkable heat map color</string>
+ <string>Color of the most walkable value when displaying the pathfinding navmesh as a heatmap.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13753,7 +13753,7 @@
<key>PathfindingFaceColor</key>
<map>
<key>Comment</key>
- <string>Nav mesh color?</string>
+ <string>Color of the faces when displaying the default view of the pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13766,10 +13766,10 @@
<real>1.0</real>
</array>
</map>
- <key>PathfindingStarValidColor</key>
+ <key>PathfindingTestPathValidEndColor</key>
<map>
<key>Comment</key>
- <string>yay!</string>
+ <string>Color of the pathfinding test-pathing tool end-point when the path is valid.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13782,10 +13782,10 @@
<real>1.0</real>
</array>
</map>
- <key>PathfindingStarInvalidColor</key>
+ <key>PathfindingTestPathInvalidEndColor</key>
<map>
<key>Comment</key>
- <string>yay!</string>
+ <string>Color of the pathfinding test-pathing tool end-point when the path is invalid.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13801,7 +13801,7 @@
<key>PathfindingTestPathColor</key>
<map>
<key>Comment</key>
- <string>yay!</string>
+ <string>Color of the pathfinding test-path when the path is valid.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13817,7 +13817,7 @@
<key>PathfindingAmbiance</key>
<map>
<key>Comment</key>
- <string>Ambiance of lit pathfinding displays.</string>
+ <string>Ambiance of lit pathfinding navmesh displays.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13829,7 +13829,7 @@
<key>PathfindingXRayTint</key>
<map>
<key>Comment</key>
- <string>Amount to darken/lighten x-ray lines in pathfinding display</string>
+ <string>Amount to darken/lighten x-ray lines in pathfinding display.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13853,7 +13853,7 @@
<key>PathfindingXRayWireframe</key>
<map>
<key>Comment</key>
- <string>Render pathfinding xray as a wireframe.</string>
+ <string>Render pathfinding navmesh xray as a wireframe.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13865,7 +13865,7 @@
<key>PathfindingLineWidth</key>
<map>
<key>Comment</key>
- <string>Width of volume outlines in pathfinding display.</string>
+ <string>Width of volume outlines in pathfinding navmesh display.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -13922,7 +13922,7 @@
<key>PathfindingWaterColor</key>
<map>
<key>Comment</key>
- <string>yay!</string>
+ <string>Color of water plane when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e66df99d76..cf6b0e1562 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -56,7 +56,7 @@
#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state
#include "llnearbychatbar.h"
#include "llnotificationsutil.h"
-#include "llpanelnavmeshrebake.h"
+#include "llpanelpathfindingrebakenavmesh.h"
#include "llpaneltopinfobar.h"
#include "llparcel.h"
#include "llrendersphere.h"
@@ -1871,7 +1871,7 @@ void LLAgent::endAnimationUpdateUI()
LLChicletBar::getInstance()->setVisible(TRUE);
LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
- LLPanelNavMeshRebake::getInstance()->setVisible(TRUE);
+ LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(TRUE);
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
@@ -1981,7 +1981,7 @@ void LLAgent::endAnimationUpdateUI()
LLChicletBar::getInstance()->setVisible(FALSE);
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
- LLPanelNavMeshRebake::getInstance()->setVisible(FALSE);
+ LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(FALSE);
// clear out camera lag effect
gAgentCamera.clearCameraLag();
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index 5245b78871..ef6388642a 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -1,29 +1,30 @@
/**
- * @file llfloaterpathfindingcharacters.cpp
- * @author William Todd Stinson
- * @brief "Pathfinding characters" floater, allowing for identification of pathfinding characters and their cpu usage.
- *
- * $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 llfloaterpathfindingcharacters.cpp
+* @brief "Pathfinding characters" floater, allowing for identification of pathfinding characters and their cpu usage.
+* @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"
@@ -39,11 +40,15 @@
#include "llpathfindingobject.h"
#include "llpathfindingobjectlist.h"
#include "llpathinglib.h"
+#include "llquaternion.h"
#include "llsd.h"
#include "lluicolortable.h"
+#include "lluuid.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "pipeline.h"
+#include "v3math.h"
+#include "v4color.h"
LLHandle<LLFloaterPathfindingCharacters> LLFloaterPathfindingCharacters::sInstanceHandle;
@@ -200,17 +205,14 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListData(const LLPathfi
columns[0]["column"] = "name";
columns[0]["value"] = pCharacterPtr->getName();
- columns[0]["font"] = "SANSSERIF";
columns[1]["column"] = "description";
columns[1]["value"] = pCharacterPtr->getDescription();
- columns[1]["font"] = "SANSSERIF";
columns[2]["column"] = "owner";
columns[2]["value"] = (pCharacterPtr->hasOwner() ?
(pCharacterPtr->hasOwnerName() ? pCharacterPtr->getOwnerName() : getString("character_owner_loading")) :
getString("character_owner_unknown"));
- columns[2]["font"] = "SANSSERIF";
S32 cpuTime = llround(pCharacterPtr->getCPUTime());
std::string cpuTimeString = llformat("%d", cpuTime);
@@ -219,11 +221,9 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListData(const LLPathfi
columns[3]["column"] = "cpu_time";
columns[3]["value"] = getString("character_cpu_time", string_args);
- columns[3]["font"] = "SANSSERIF";
columns[4]["column"] = "altitude";
columns[4]["value"] = llformat("%1.0f m", pCharacterPtr->getLocation()[2]);
- columns[4]["font"] = "SANSSERIF";
LLSD element;
element["id"] = pCharacterPtr->getUUID().asString();
diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h
index 56e08b7603..ef389ad428 100644
--- a/indra/newview/llfloaterpathfindingcharacters.h
+++ b/indra/newview/llfloaterpathfindingcharacters.h
@@ -1,40 +1,43 @@
/**
-* @file llfloaterpathfindingcharacters.h
-* @author William Todd Stinson
-* @brief "Pathfinding characters" floater, allowing for identification of pathfinding characters and their cpu usage.
+* @file llfloaterpathfindingcharacters.h
+* @brief "Pathfinding characters" floater, allowing for identification of pathfinding characters and their cpu usage.
+* @author Stinson@lindenlab.com
*
-* $LicenseInfo:firstyear=2002&license=viewerlgpl$
+* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
+* 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$
*/
-
#ifndef LL_LLFLOATERPATHFINDINGCHARACTERS_H
#define LL_LLFLOATERPATHFINDINGCHARACTERS_H
#include "llfloaterpathfindingobjects.h"
#include "llhandle.h"
#include "llpathfindingobjectlist.h"
+#include "lluuid.h"
#include "v4color.h"
+class LLCheckBoxCtrl;
class LLPathfindingCharacter;
+class LLQuaternion;
class LLSD;
+class LLVector3;
class LLFloaterPathfindingCharacters : public LLFloaterPathfindingObjects
{
@@ -44,7 +47,7 @@ public:
BOOL isShowPhysicsCapsule() const;
void setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule);
- BOOL isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot ) const;
+ BOOL isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const;
static void openCharactersWithSelectedObjects();
static LLHandle<LLFloaterPathfindingCharacters> getInstanceHandle();
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 2cf7f3aeb1..2fe60a8d8f 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -1,57 +1,60 @@
/**
* @file llfloaterpathfindingconsole.cpp
-* @author William Todd Stinson
-* @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings.
+* @brief "Pathfinding console" floater, allowing for viewing and testing of the pathfinding navmesh through Havok AI utilities.
+* @author Stinson@lindenlab.com
*
-* $LicenseInfo:firstyear=2002&license=viewerlgpl$
+* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
+* 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"
+
#include "llfloaterpathfindingconsole.h"
-#include "llfloaterpathfindinglinksets.h"
-#include "llfloaterpathfindingcharacters.h"
-#include "llsd.h"
-#include "llhandle.h"
-#include "llcontrol.h"
-#include "llpanel.h"
+#include <vector>
+
+#include <boost/signals2.hpp>
+
#include "llbutton.h"
#include "llcheckboxctrl.h"
-#include "llsliderctrl.h"
-#include "lllineeditor.h"
-#include "lltextbase.h"
-#include "lltabcontainer.h"
#include "llcombobox.h"
+#include "llcontrol.h"
+#include "llenvmanager.h"
+#include "llfloaterpathfindingcharacters.h"
+#include "llfloaterpathfindinglinksets.h"
#include "llfloaterreg.h"
+#include "llhandle.h"
+#include "llpanel.h"
#include "llpathfindingnavmeshzone.h"
-#include "llpathfindingmanager.h"
-#include "llenvmanager.h"
#include "llpathfindingpathtool.h"
+#include "llpathinglib.h"
+#include "llsliderctrl.h"
+#include "llsd.h"
+#include "lltabcontainer.h"
+#include "lltextbase.h"
#include "lltoolmgr.h"
#include "lltoolfocus.h"
-#include "pipeline.h"
-#include "llpathinglib.h"
#include "llviewerparcelmgr.h"
-#include "llpanelnavmeshrebake.h"
+#include "pipeline.h"
#define XUI_RENDER_HEATMAP_NONE 0
#define XUI_RENDER_HEATMAP_A 1
@@ -70,7 +73,7 @@
#define SET_SHAPE_RENDER_FLAG(_flag,_type) _flag |= (1U << _type)
-#define CONTROL_NAME_RETRIEVE_NEIGHBOR "RetrieveNeighboringRegion"
+#define CONTROL_NAME_RETRIEVE_NEIGHBOR "PathfindingRetrieveNeighboringRegion"
#define CONTROL_NAME_WALKABLE_OBJECTS "PathfindingWalkable"
#define CONTROL_NAME_STATIC_OBSTACLE_OBJECTS "PathfindingObstacle"
#define CONTROL_NAME_MATERIAL_VOLUMES "PathfindingMaterial"
@@ -80,15 +83,13 @@
#define CONTROL_NAME_HEATMAP_MIN "PathfindingHeatColorBase"
#define CONTROL_NAME_HEATMAP_MAX "PathfindingHeatColorMax"
#define CONTROL_NAME_NAVMESH_FACE "PathfindingFaceColor"
-#define CONTROL_NAME_TEST_PATH_VALID_END "PathfindingStarValidColor"
-#define CONTROL_NAME_TEST_PATH_INVALID_END "PathfindingStarInvalidColor"
+#define CONTROL_NAME_TEST_PATH_VALID_END "PathfindingTestPathValidEndColor"
+#define CONTROL_NAME_TEST_PATH_INVALID_END "PathfindingTestPathInvalidEndColor"
#define CONTROL_NAME_TEST_PATH "PathfindingTestPathColor"
#define CONTROL_NAME_WATER "PathfindingWaterColor"
LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::sInstanceHandle;
-extern LLPipeline gPipeline;
-
//---------------------------------------------------------------------------
// LLFloaterPathfindingConsole
//---------------------------------------------------------------------------
@@ -211,7 +212,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
{
if (!mNavMeshZoneSlot.connected())
{
- mNavMeshZoneSlot = mNavMeshZone.registerNavMeshZoneListener(boost::bind(&LLFloaterPathfindingConsole::onNavMeshZoneCB, this, _1));
+ mNavMeshZoneSlot = mNavMeshZone.registerNavMeshZoneListener(boost::bind(&LLFloaterPathfindingConsole::handleNavMeshZoneStatus, this, _1));
}
mIsNavMeshUpdating = false;
@@ -498,9 +499,10 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)
mSavedSettingNavMeshFaceSlot(),
mSavedSettingTestPathValidEndSlot(),
mSavedSettingTestPathInvalidEndSlot(),
- mSavedSettingWaterSlot(),
mSavedSettingTestPathSlot(),
- mConsoleState(kConsoleStateUnknown)
+ mSavedSettingWaterSlot(),
+ mConsoleState(kConsoleStateUnknown),
+ mRenderableRestoreList()
{
mSelfHandle.bind(this);
}
@@ -539,7 +541,10 @@ void LLFloaterPathfindingConsole::onShowNavMeshSet()
void LLFloaterPathfindingConsole::onShowWalkabilitySet()
{
- LLPathingLib::getInstance()->setNavMeshMaterialType(getRenderHeatmapType());
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLPathingLib::getInstance()->setNavMeshMaterialType(getRenderHeatmapType());
+ }
}
void LLFloaterPathfindingConsole::onCharacterWidthSet()
@@ -557,7 +562,7 @@ void LLFloaterPathfindingConsole::onClearPathClicked()
clearPath();
}
-void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus)
+void LLFloaterPathfindingConsole::handleNavMeshZoneStatus(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus)
{
switch (pNavMeshZoneRequestStatus)
{
@@ -639,6 +644,7 @@ void LLFloaterPathfindingConsole::setDefaultInputs()
{
mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX);
setRenderWorld(TRUE);
+ setRenderWorldMovablesOnly(FALSE);
setRenderNavMesh(FALSE);
setRenderWalkables(FALSE);
setRenderMaterialVolumes(FALSE);
@@ -646,7 +652,6 @@ void LLFloaterPathfindingConsole::setDefaultInputs()
setRenderExclusionVolumes(FALSE);
setRenderWaterPlane(FALSE);
setRenderXRay(FALSE);
- setRenderWorldMovablesOnly(FALSE);
}
void LLFloaterPathfindingConsole::setConsoleState(EConsoleState pConsoleState)
@@ -1203,6 +1208,10 @@ void LLFloaterPathfindingConsole::deregisterSavedSettingsListeners()
{
mSavedSettingTestPathSlot.disconnect();
}
+ if (mSavedSettingWaterSlot.connected())
+ {
+ mSavedSettingWaterSlot.disconnect();
+ }
}
void LLFloaterPathfindingConsole::handleRetrieveNeighborChange(LLControlVariable *pControl, const LLSD &pNewValue)
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index b0c14e5345..4b2f7672e4 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -1,53 +1,53 @@
/**
- * @file llfloaterpathfindingconsole.h
- * @author William Todd Stinson
- * @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings.
- *
- * $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 llfloaterpathfindingconsole.h
+* @brief "Pathfinding console" floater, allowing for viewing and testing of the pathfinding navmesh through Havok AI utilities.
+* @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$
+*/
#ifndef LL_LLFLOATERPATHFINDINGCONSOLE_H
#define LL_LLFLOATERPATHFINDINGCONSOLE_H
+#include <vector>
+
+#include <boost/signals2.hpp>
+
#include "llfloater.h"
#include "llhandle.h"
-#include "llpathinglib.h"
#include "llpathfindingnavmeshzone.h"
#include "llpathfindingpathtool.h"
+#include "llpathinglib.h"
#include "v4color.h"
-#include <boost/signals2.hpp>
-
-class LLSD;
+class LLButton;
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLControlVariable;
class LLPanel;
+class LLSD;
class LLSliderCtrl;
-class LLLineEditor;
-class LLTextBase;
-class LLCheckBoxCtrl;
class LLTabContainer;
-class LLComboBox;
-class LLButton;
+class LLTextBase;
class LLToolset;
-class LLControlVariable;
class LLFloaterPathfindingConsole
: public LLFloater
@@ -123,7 +123,7 @@ private:
void onCharacterTypeSwitch();
void onClearPathClicked();
- void onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus);
+ void handleNavMeshZoneStatus(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus);
void onRegionBoundaryCross();
void onPathEvent();
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index ae814b0087..9516b4b0c1 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -1,39 +1,43 @@
/**
* @file llfloaterpathfindinglinksets.cpp
-* @author William Todd Stinson
-* @brief "Pathfinding linksets" floater, allowing manipulation of the Havok AI pathfinding settings.
+* @brief "Pathfinding linksets" floater, allowing manipulation of the linksets on the current region.
+* @author Stinson@lindenlab.com
*
-* $LicenseInfo:firstyear=2002&license=viewerlgpl$
+* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
+* 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"
#include "llfloaterpathfindinglinksets.h"
+#include <string>
+
#include <boost/bind.hpp>
#include "llagent.h"
#include "llbutton.h"
#include "llcombobox.h"
+#include "llfloaterpathfindingobjects.h"
#include "llfloaterreg.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
@@ -45,6 +49,7 @@
#include "lltextbase.h"
#include "lltextvalidate.h"
#include "lluicolortable.h"
+#include "lluictrl.h"
#include "v3math.h"
#include "v4color.h"
@@ -63,6 +68,7 @@
void LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects()
{
LLFloaterPathfindingLinksets *linksetsFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingLinksets>("pathfinding_linksets");
+ linksetsFloater->clearFilters();
linksetsFloater->showFloaterWithSelectionObjects();
}
@@ -282,12 +288,13 @@ void LLFloaterPathfindingLinksets::requestSetLinksets(LLPathfindingObjectListPtr
void LLFloaterPathfindingLinksets::onApplyAllFilters()
{
- applyFilters();
+ rebuildObjectsScrollList();
}
void LLFloaterPathfindingLinksets::onClearFiltersClicked()
{
clearFilters();
+ rebuildObjectsScrollList();
}
void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl)
@@ -317,17 +324,11 @@ void LLFloaterPathfindingLinksets::onApplyChangesClicked()
applyEdit();
}
-void LLFloaterPathfindingLinksets::applyFilters()
-{
- rebuildObjectsScrollList();
-}
-
void LLFloaterPathfindingLinksets::clearFilters()
{
mFilterByName->clear();
mFilterByDescription->clear();
setFilterLinksetUse(LLPathfindingLinkset::kUnknown);
- rebuildObjectsScrollList();
}
void LLFloaterPathfindingLinksets::updateEditFieldValues()
@@ -365,47 +366,37 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListData(const LLPathfindin
{
columns[0]["column"] = "name";
columns[0]["value"] = getString("linkset_terrain_name");
- columns[0]["font"] = "SANSSERIF";
columns[1]["column"] = "description";
columns[1]["value"] = getString("linkset_terrain_description");
- columns[1]["font"] = "SANSSERIF";
columns[2]["column"] = "owner";
columns[2]["value"] = getString("linkset_terrain_owner");
- columns[2]["font"] = "SANSSERIF";
columns[3]["column"] = "land_impact";
columns[3]["value"] = getString("linkset_terrain_land_impact");
- columns[3]["font"] = "SANSSERIF";
columns[4]["column"] = "dist_from_you";
columns[4]["value"] = getString("linkset_terrain_dist_from_you");
- columns[4]["font"] = "SANSSERIF";
}
else
{
columns[0]["column"] = "name";
columns[0]["value"] = pLinksetPtr->getName();
- columns[0]["font"] = "SANSSERIF";
columns[1]["column"] = "description";
columns[1]["value"] = pLinksetPtr->getDescription();
- columns[1]["font"] = "SANSSERIF";
columns[2]["column"] = "owner";
columns[2]["value"] = (pLinksetPtr->hasOwner() ?
(pLinksetPtr->hasOwnerName() ? pLinksetPtr->getOwnerName() : getString("linkset_owner_loading")) :
getString("linkset_owner_unknown"));
- columns[2]["font"] = "SANSSERIF";
columns[3]["column"] = "land_impact";
columns[3]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
- columns[3]["font"] = "SANSSERIF";
columns[4]["column"] = "dist_from_you";
columns[4]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation()));
- columns[4]["font"] = "SANSSERIF";
}
columns[5]["column"] = "linkset_use";
@@ -427,23 +418,18 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListData(const LLPathfindin
linksetUse += (" " + getString("linkset_is_restricted_non_volume_state"));
}
columns[5]["value"] = linksetUse;
- columns[5]["font"] = "SANSSERIF";
columns[6]["column"] = "a_percent";
columns[6]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA());
- columns[6]["font"] = "SANSSERIF";
columns[7]["column"] = "b_percent";
columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB());
- columns[7]["font"] = "SANSSERIF";
columns[8]["column"] = "c_percent";
columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC());
- columns[8]["font"] = "SANSSERIF";
columns[9]["column"] = "d_percent";
columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD());
- columns[9]["font"] = "SANSSERIF";
LLSD element;
element["id"] = pLinksetPtr->getUUID().asString();
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index 8e82992dbf..a4631ffeb7 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -1,36 +1,36 @@
/**
- * @file llfloaterpathfindinglinksets.h
- * @author William Todd Stinson
- * @brief "Pathfinding linksets" floater, allowing manipulation of the Havok AI pathfinding settings.
- *
- * $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 llfloaterpathfindinglinksets.h
+* @brief "Pathfinding linksets" floater, allowing manipulation of the linksets on the current region.
+* @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$
+*/
#ifndef LL_LLFLOATERPATHFINDINGLINKSETS_H
#define LL_LLFLOATERPATHFINDINGLINKSETS_H
+#include <string>
+
#include "llfloaterpathfindingobjects.h"
#include "llpathfindinglinkset.h"
-#include "llpathfindingmanager.h"
#include "llpathfindingobjectlist.h"
#include "v4color.h"
@@ -75,7 +75,6 @@ private:
void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl);
void onApplyChangesClicked();
- void applyFilters();
void clearFilters();
void updateEditFieldValues();
@@ -103,29 +102,29 @@ private:
LLPathfindingLinkset::ELinksetUse convertToLinksetUse(LLSD pXuiValue) const;
LLSD convertToXuiValue(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
- LLLineEditor *mFilterByName;
- LLLineEditor *mFilterByDescription;
- LLComboBox *mFilterByLinksetUse;
- LLComboBox *mEditLinksetUse;
- LLScrollListItem *mEditLinksetUseUnset;
- LLScrollListItem *mEditLinksetUseWalkable;
- LLScrollListItem *mEditLinksetUseStaticObstacle;
- LLScrollListItem *mEditLinksetUseDynamicObstacle;
- LLScrollListItem *mEditLinksetUseMaterialVolume;
- LLScrollListItem *mEditLinksetUseExclusionVolume;
- LLScrollListItem *mEditLinksetUseDynamicPhantom;
- LLTextBase *mLabelWalkabilityCoefficients;
- LLTextBase *mLabelEditA;
- LLLineEditor *mEditA;
- LLTextBase *mLabelEditB;
- LLLineEditor *mEditB;
- LLTextBase *mLabelEditC;
- LLLineEditor *mEditC;
- LLTextBase *mLabelEditD;
- LLLineEditor *mEditD;
- LLButton *mApplyEditsButton;
-
- LLColor4 mBeaconColor;
+ LLLineEditor *mFilterByName;
+ LLLineEditor *mFilterByDescription;
+ LLComboBox *mFilterByLinksetUse;
+ LLComboBox *mEditLinksetUse;
+ LLScrollListItem *mEditLinksetUseUnset;
+ LLScrollListItem *mEditLinksetUseWalkable;
+ LLScrollListItem *mEditLinksetUseStaticObstacle;
+ LLScrollListItem *mEditLinksetUseDynamicObstacle;
+ LLScrollListItem *mEditLinksetUseMaterialVolume;
+ LLScrollListItem *mEditLinksetUseExclusionVolume;
+ LLScrollListItem *mEditLinksetUseDynamicPhantom;
+ LLTextBase *mLabelWalkabilityCoefficients;
+ LLTextBase *mLabelEditA;
+ LLLineEditor *mEditA;
+ LLTextBase *mLabelEditB;
+ LLLineEditor *mEditB;
+ LLTextBase *mLabelEditC;
+ LLLineEditor *mEditC;
+ LLTextBase *mLabelEditD;
+ LLLineEditor *mEditD;
+ LLButton *mApplyEditsButton;
+
+ LLColor4 mBeaconColor;
};
#endif // LL_LLFLOATERPATHFINDINGLINKSETS_H
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index 9bfbc582bd..e246265be9 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -1,6 +1,6 @@
/**
* @file llfloaterpathfindingobjects.cpp
-* @brief Implementation of llfloaterpathfindingobjects
+* @brief Base class for both the pathfinding linksets and characters floater.
* @author Stinson@lindenlab.com
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
@@ -41,10 +41,12 @@
#include "llcheckboxctrl.h"
#include "llenvmanager.h"
#include "llfloater.h"
+#include "llfontgl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpathfindingmanager.h"
#include "llresmgr.h"
+#include "llscrolllistcell.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llselectmgr.h"
@@ -57,9 +59,9 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
+#include "v3dmath.h"
+#include "v3math.h"
#include "v4color.h"
-#include "pipeline.h"
-#include "llfloaterreg.h"
#define DEFAULT_BEACON_WIDTH 6
@@ -346,10 +348,38 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList()
{
LLSD scrollListData = convertObjectsIntoScrollListData(mObjectList);
llassert(scrollListData.isArray());
- for (LLSD::array_const_iterator elementIter = scrollListData.beginArray(); elementIter != scrollListData.endArray(); ++elementIter)
+
+ LLScrollListCell::Params cellParams;
+ cellParams.font = LLFontGL::getFontSansSerif();
+
+ for (LLSD::array_const_iterator rowElementIter = scrollListData.beginArray(); rowElementIter != scrollListData.endArray(); ++rowElementIter)
{
- const LLSD &element = *elementIter;
- mObjectsScrollList->addElement(element);
+ const LLSD &rowElement = *rowElementIter;
+
+ LLScrollListItem::Params rowParams;
+ llassert(rowElement.has("id"));
+ llassert(rowElement.get("id").isString());
+ rowParams.value = rowElement.get("id");
+
+ llassert(rowElement.has("column"));
+ llassert(rowElement.get("column").isArray());
+ const LLSD &columnElement = rowElement.get("column");
+ for (LLSD::array_const_iterator cellIter = columnElement.beginArray(); cellIter != columnElement.endArray(); ++cellIter)
+ {
+ const LLSD &cellElement = *cellIter;
+
+ llassert(cellElement.has("column"));
+ llassert(cellElement.get("column").isString());
+ cellParams.column = cellElement.get("column").asString();
+
+ llassert(cellElement.has("value"));
+ llassert(cellElement.get("value").isString());
+ cellParams.value = cellElement.get("value").asString();
+
+ rowParams.columns.add(cellParams);
+ }
+
+ mObjectsScrollList->addRow(rowParams);
}
}
@@ -488,14 +518,20 @@ void LLFloaterPathfindingObjects::teleportToSelectedObject()
std::vector<LLScrollListItem*>::const_reference selectedItemRef = selectedItems.front();
const LLScrollListItem *selectedItem = selectedItemRef;
llassert(mObjectList != NULL);
- const LLPathfindingObjectPtr objectPtr = mObjectList->find(selectedItem->getUUID().asString());
- const LLVector3 &objectLocation = objectPtr->getLocation();
-
- LLViewerRegion* region = gAgent.getRegion();
- if (region != NULL)
+ LLVector3d teleportLocation;
+ LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID());
+ if (viewerObject == NULL)
{
- gAgent.teleportRequest(region->getHandle(), objectLocation, true);
+ // If we cannot find the object in the viewer list, teleport to the last reported position
+ const LLPathfindingObjectPtr objectPtr = mObjectList->find(selectedItem->getUUID().asString());
+ teleportLocation = gAgent.getPosGlobalFromAgent(objectPtr->getLocation());
}
+ else
+ {
+ // If we can find the object in the viewer list, teleport to the known current position
+ teleportLocation = viewerObject->getPositionGlobal();
+ }
+ gAgent.teleportViaLocationLookAt(teleportLocation);
}
}
@@ -828,4 +864,3 @@ LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollLis
return objectPtr;
}
-
diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h
index 84b0f3f3fe..e8d446b598 100644
--- a/indra/newview/llfloaterpathfindingobjects.h
+++ b/indra/newview/llfloaterpathfindingobjects.h
@@ -1,6 +1,6 @@
/**
* @file llfloaterpathfindingobjects.h
-* @brief Header file for llfloaterpathfindingobjects
+* @brief Base class for both the pathfinding linksets and characters floater.
* @author Stinson@lindenlab.com
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
@@ -28,6 +28,7 @@
#define LL_LLFLOATERPATHFINDINGOBJECTS_H
#include <set>
+
#include <boost/signals2.hpp>
#include "llagent.h"
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 65c73bb0ec..93f7146fc8 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -686,7 +686,7 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
gAgent.setFlying(FALSE);
setFocus(FALSE); // EXT-482
- setVisible(FALSE);
+ mStopFlyingButton->setVisible(FALSE);
}
/**
diff --git a/indra/newview/llpanelnavmeshrebake.h b/indra/newview/llpanelnavmeshrebake.h
deleted file mode 100644
index ecd5ad2111..0000000000
--- a/indra/newview/llpanelnavmeshrebake.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file llpanelenavmeshrebake.h
- * @author prep
- * @brief handles the buttons for navmesh rebaking
- *
- * $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_NAVMESHREBAKE_H
-#define LL_NAVMESHREBAKE_H
-
-#include <boost/bind.hpp>
-#include <boost/signals2.hpp>
-
-#include "llhandle.h"
-#include "llpanel.h"
-#include "llpathfindingmanager.h"
-#include "llpathfindingnavmesh.h"
-
-class LLButton;
-class LLPathfindingNavMeshStatus;
-class LLView;
-
-class LLPanelNavMeshRebake : public LLPanel
-{
-
- LOG_CLASS(LLPanelNavMeshRebake);
-
-public:
- static LLPanelNavMeshRebake* getInstance();
-
- virtual BOOL postBuild();
-
- virtual void draw();
- virtual BOOL handleToolTip( S32 x, S32 y, MASK mask );
-
-protected:
-
-private:
- typedef enum
- {
- kRebakeNavMesh_Available,
- kRebakeNavMesh_RequestSent,
- kRebakeNavMesh_NotAvailable,
- kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable
- } ERebakeNavMeshMode;
-
- LLPanelNavMeshRebake();
- virtual ~LLPanelNavMeshRebake();
-
- static LLPanelNavMeshRebake* getPanel();
-
- void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
-
- void onNavMeshRebakeClick();
-
- void handleAgentState(BOOL pCanRebakeRegion);
- void handleRebakeNavMeshResponse(bool pResponseStatus);
- void handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus);
- void handleRegionBoundaryCrossed();
-
- void createNavMeshStatusListenerForCurrentRegion();
-
- bool doDraw() const;
- void updatePosition();
-
- BOOL mCanRebakeRegion;
- ERebakeNavMeshMode mRebakeNavMeshMode;
-
- LLButton* mNavMeshRebakeButton;
- LLButton* mNavMeshBakingButton;
-
- LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
- boost::signals2::connection mRegionCrossingSlot;
- LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
-};
-
-#endif //LL_NAVMESHREBAKE_H
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index a740db00e2..068ccf23b5 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -66,8 +66,6 @@
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
//#include "llfirstuse.h"
-#include "llfloatertools.h"
-#include "llpathfindingmanager.h"
#include "lldrawpool.h"
diff --git a/indra/newview/llpanelnavmeshrebake.cpp b/indra/newview/llpanelpathfindingrebakenavmesh.cpp
index ecd90d9f46..2c8c46c7bc 100644
--- a/indra/newview/llpanelnavmeshrebake.cpp
+++ b/indra/newview/llpanelpathfindingrebakenavmesh.cpp
@@ -1,33 +1,34 @@
-/**
- * @file LLPanelNavMeshRebake.cpp
- * @author prep
- * @brief handles the buttons for navmesh rebaking
- *
- * $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 llpanelpathfindingrebakenavmesh.cpp
+* @brief Implementation of llpanelpathfindingrebakenavmesh
+* @author Prep@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"
-#include "llpanelnavmeshrebake.h"
+#include "llpanelpathfindingrebakenavmesh.h"
#include <boost/bind.hpp>
#include <boost/signals2.hpp>
@@ -35,7 +36,6 @@
#include "llagent.h"
#include "llbutton.h"
#include "llenvmanager.h"
-#include "llhandle.h"
#include "llhints.h"
#include "llnotificationsutil.h"
#include "llpanel.h"
@@ -44,27 +44,30 @@
#include "llpathfindingnavmeshstatus.h"
#include "lltoolbar.h"
#include "lltoolbarview.h"
-#include "lltoolmgr.h"
#include "lltooltip.h"
-#include "llview.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
-LLPanelNavMeshRebake* LLPanelNavMeshRebake::getInstance()
+LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getInstance()
{
- static LLPanelNavMeshRebake* panel = getPanel();
+ static LLPanelPathfindingRebakeNavmesh* panel = getPanel();
return panel;
}
-BOOL LLPanelNavMeshRebake::postBuild()
+BOOL LLPanelPathfindingRebakeNavmesh::postBuild()
{
- //Rebake initiated
+ //Rebake button
mNavMeshRebakeButton = findChild<LLButton>("navmesh_btn");
llassert(mNavMeshRebakeButton != NULL);
- mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelNavMeshRebake::onNavMeshRebakeClick, this));
+ mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick, this));
LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle());
- //Baking...
+ //Sending rebake request
+ mNavMeshSendingButton = findChild<LLButton>("navmesh_btn_sending");
+ llassert(mNavMeshSendingButton != NULL);
+ LLHints::registerHintTarget("navmesh_btn_sending", mNavMeshSendingButton->getHandle());
+
+ //rebaking...
mNavMeshBakingButton = findChild<LLButton>("navmesh_btn_baking");
llassert(mNavMeshBakingButton != NULL);
LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle());
@@ -75,19 +78,19 @@ BOOL LLPanelNavMeshRebake::postBuild()
if ( !mRegionCrossingSlot.connected() )
{
- mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPanelNavMeshRebake::handleRegionBoundaryCrossed, this));
+ mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this));
}
if (!mAgentStateSlot.connected())
{
- mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLPanelNavMeshRebake::handleAgentState, this, _1));
+ mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleAgentState, this, _1));
}
LLPathfindingManager::getInstance()->requestGetAgentState();
return LLPanel::postBuild();
}
-void LLPanelNavMeshRebake::draw()
+void LLPanelPathfindingRebakeNavmesh::draw()
{
if (doDraw())
{
@@ -96,7 +99,7 @@ void LLPanelNavMeshRebake::draw()
}
}
-BOOL LLPanelNavMeshRebake::handleToolTip( S32 x, S32 y, MASK mask )
+BOOL LLPanelPathfindingRebakeNavmesh::handleToolTip( S32 x, S32 y, MASK mask )
{
LLToolTipMgr::instance().unblockToolTips();
@@ -104,14 +107,24 @@ BOOL LLPanelNavMeshRebake::handleToolTip( S32 x, S32 y, MASK mask )
{
LLToolTipMgr::instance().show(mNavMeshRebakeButton->getToolTip());
}
+ else if (mNavMeshSendingButton->getVisible())
+ {
+ LLToolTipMgr::instance().show(mNavMeshSendingButton->getToolTip());
+ }
+ else if (mNavMeshBakingButton->getVisible())
+ {
+ LLToolTipMgr::instance().show(mNavMeshBakingButton->getToolTip());
+ }
return LLPanel::handleToolTip(x, y, mask);
}
-LLPanelNavMeshRebake::LLPanelNavMeshRebake()
- : mCanRebakeRegion(FALSE),
+LLPanelPathfindingRebakeNavmesh::LLPanelPathfindingRebakeNavmesh()
+ : LLPanel(),
+ mCanRebakeRegion(FALSE),
mRebakeNavMeshMode(kRebakeNavMesh_Default),
mNavMeshRebakeButton(NULL),
+ mNavMeshSendingButton(NULL),
mNavMeshBakingButton(NULL),
mNavMeshSlot(),
mRegionCrossingSlot(),
@@ -123,45 +136,56 @@ LLPanelNavMeshRebake::LLPanelNavMeshRebake()
b=false;
}
-LLPanelNavMeshRebake::~LLPanelNavMeshRebake()
+LLPanelPathfindingRebakeNavmesh::~LLPanelPathfindingRebakeNavmesh()
{
}
-LLPanelNavMeshRebake* LLPanelNavMeshRebake::getPanel()
+LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getPanel()
{
- LLPanelNavMeshRebake* panel = new LLPanelNavMeshRebake();
+ LLPanelPathfindingRebakeNavmesh* panel = new LLPanelPathfindingRebakeNavmesh();
panel->buildFromFile("panel_navmesh_rebake.xml");
return panel;
}
-void LLPanelNavMeshRebake::setMode(ERebakeNavMeshMode pRebakeNavMeshMode)
+void LLPanelPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshMode)
{
if (pRebakeNavMeshMode == kRebakeNavMesh_Available)
{
LLNotificationsUtil::add("PathfindingRebakeNavmesh");
}
mNavMeshRebakeButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_Available);
- mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent);
+ mNavMeshSendingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent);
+ mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_InProgress);
mRebakeNavMeshMode = pRebakeNavMeshMode;
}
-void LLPanelNavMeshRebake::onNavMeshRebakeClick()
+void LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick()
{
setMode(kRebakeNavMesh_RequestSent);
- LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLPanelNavMeshRebake::handleRebakeNavMeshResponse, this, _1));
+ LLPathfindingManager::getInstance()->requestRebakeNavMesh(boost::bind(&LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse, this, _1));
}
-void LLPanelNavMeshRebake::handleAgentState(BOOL pCanRebakeRegion)
+void LLPanelPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion)
{
mCanRebakeRegion = pCanRebakeRegion;
}
-void LLPanelNavMeshRebake::handleRebakeNavMeshResponse(bool pResponseStatus)
+void LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus)
{
- setMode(pResponseStatus ? kRebakeNavMesh_NotAvailable : kRebakeNavMesh_Available);
+ setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default);
+ if (!pResponseStatus)
+ {
+ LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh");
+ }
+
+ LLViewerRegion *currentRegion = gAgent.getRegion();
+ if (currentRegion != NULL)
+ {
+ LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
+ }
}
-void LLPanelNavMeshRebake::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus)
+void LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default;
if (pNavMeshStatus.isValid())
@@ -173,6 +197,8 @@ void LLPanelNavMeshRebake::handleNavMeshStatus(const LLPathfindingNavMeshStatus
rebakeNavMeshMode = kRebakeNavMesh_Available;
break;
case LLPathfindingNavMeshStatus::kBuilding :
+ rebakeNavMeshMode = kRebakeNavMesh_InProgress;
+ break;
case LLPathfindingNavMeshStatus::kComplete :
rebakeNavMeshMode = kRebakeNavMesh_NotAvailable;
break;
@@ -186,34 +212,34 @@ void LLPanelNavMeshRebake::handleNavMeshStatus(const LLPathfindingNavMeshStatus
setMode(rebakeNavMeshMode);
}
-void LLPanelNavMeshRebake::handleRegionBoundaryCrossed()
+void LLPanelPathfindingRebakeNavmesh::handleRegionBoundaryCrossed()
{
createNavMeshStatusListenerForCurrentRegion();
+ mCanRebakeRegion = FALSE;
LLPathfindingManager::getInstance()->requestGetAgentState();
}
-void LLPanelNavMeshRebake::createNavMeshStatusListenerForCurrentRegion()
+void LLPanelPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion()
{
if (mNavMeshSlot.connected())
{
mNavMeshSlot.disconnect();
}
- mCanRebakeRegion = FALSE;
LLViewerRegion *currentRegion = gAgent.getRegion();
if (currentRegion != NULL)
{
- mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPanelNavMeshRebake::handleNavMeshStatus, this, _2));
+ mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus, this, _2));
LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
}
}
-bool LLPanelNavMeshRebake::doDraw() const
+bool LLPanelPathfindingRebakeNavmesh::doDraw() const
{
return ((mCanRebakeRegion || gSavedSettings.getBOOL("PathfindingEnableAlwaysAllowRebakeNavMesh")) && (mRebakeNavMeshMode != kRebakeNavMesh_NotAvailable));
}
-void LLPanelNavMeshRebake::updatePosition()
+void LLPanelPathfindingRebakeNavmesh::updatePosition()
{
S32 y_pos = 0;
S32 bottom_tb_center = 0;
diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llpanelpathfindingrebakenavmesh.h
new file mode 100644
index 0000000000..5fe581ec2f
--- /dev/null
+++ b/indra/newview/llpanelpathfindingrebakenavmesh.h
@@ -0,0 +1,95 @@
+/**
+* @file llpanelpathfindingrebakenavmesh.h
+* @brief Header file for llpanelpathfindingrebakenavmesh
+* @author Prep@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$
+*/
+#ifndef LL_LLPANELPATHFINDINGREBAKENAVMESH_H
+#define LL_LLPANELPATHFINDINGREBAKENAVMESH_H
+
+#include <boost/signals2.hpp>
+
+#include "llpanel.h"
+#include "llpathfindingmanager.h"
+#include "llpathfindingnavmesh.h"
+
+class LLButton;
+class LLPathfindingNavMeshStatus;
+
+class LLPanelPathfindingRebakeNavmesh : public LLPanel
+{
+
+ LOG_CLASS(LLPanelPathfindingRebakeNavmesh);
+
+public:
+ static LLPanelPathfindingRebakeNavmesh* getInstance();
+
+ virtual BOOL postBuild();
+
+ virtual void draw();
+ virtual BOOL handleToolTip( S32 x, S32 y, MASK mask );
+
+protected:
+
+private:
+ typedef enum
+ {
+ kRebakeNavMesh_Available,
+ kRebakeNavMesh_RequestSent,
+ kRebakeNavMesh_InProgress,
+ kRebakeNavMesh_NotAvailable,
+ kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable
+ } ERebakeNavMeshMode;
+
+ LLPanelPathfindingRebakeNavmesh();
+ virtual ~LLPanelPathfindingRebakeNavmesh();
+
+ static LLPanelPathfindingRebakeNavmesh* getPanel();
+
+ void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
+
+ void onNavMeshRebakeClick();
+
+ void handleAgentState(BOOL pCanRebakeRegion);
+ void handleRebakeNavMeshResponse(bool pResponseStatus);
+ void handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus);
+ void handleRegionBoundaryCrossed();
+
+ void createNavMeshStatusListenerForCurrentRegion();
+
+ bool doDraw() const;
+ void updatePosition();
+
+ BOOL mCanRebakeRegion;
+ ERebakeNavMeshMode mRebakeNavMeshMode;
+
+ LLButton* mNavMeshRebakeButton;
+ LLButton* mNavMeshSendingButton;
+ LLButton* mNavMeshBakingButton;
+
+ LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
+ boost::signals2::connection mRegionCrossingSlot;
+ LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
+};
+
+#endif // LL_LLPANELPATHFINDINGREBAKENAVMESH_H
diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp
index c9f3555e9c..00f2ebc4bb 100644
--- a/indra/newview/llpathfindingcharacter.cpp
+++ b/indra/newview/llpathfindingcharacter.cpp
@@ -1,34 +1,37 @@
/**
- * @file llpathfindingcharacter.cpp
- * @author William Todd Stinson
- * @brief Definition of a pathfinding character that contains various properties required for havok pathfinding.
- *
- * $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$
- */
+* @file llpathfindingcharacter.cpp
+* @brief Definition of a pathfinding character that contains various properties required for havok pathfinding.
+* @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"
#include "llpathfindingcharacter.h"
+#include <string>
+
#include "llpathfindingobject.h"
#include "llsd.h"
diff --git a/indra/newview/llpathfindingcharacter.h b/indra/newview/llpathfindingcharacter.h
index 1b0a154d77..7cf9f401b0 100644
--- a/indra/newview/llpathfindingcharacter.h
+++ b/indra/newview/llpathfindingcharacter.h
@@ -1,33 +1,34 @@
/**
- * @file llpathfindingcharacter.h
- * @author William Todd Stinson
- * @brief Definition of a pathfinding character that contains various properties required for havok pathfinding.
- *
- * $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 llpathfindingcharacter.h
+* @brief Definition of a pathfinding character that contains various properties required for havok pathfinding.
+* @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$
+*/
#ifndef LL_LLPATHFINDINGCHARACTER_H
#define LL_LLPATHFINDINGCHARACTER_H
+#include <string>
+
#include "llpathfindingobject.h"
class LLSD;
@@ -49,8 +50,6 @@ public:
protected:
-public:
-
private:
void parseCharacterData(const LLSD &pCharacterData);
diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp
index 9b0ed14e35..12340cebfa 100644
--- a/indra/newview/llpathfindingcharacterlist.cpp
+++ b/indra/newview/llpathfindingcharacterlist.cpp
@@ -1,29 +1,30 @@
/**
- * @file llpathfindingcharacterlist.cpp
- * @author William Todd Stinson
- * @brief Class to implement the list of a set of pathfinding characters
- *
- * $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 llpathfindingcharacterlist.cpp
+* @brief Implementation of llpathfindingcharacterlist
+* @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"
diff --git a/indra/newview/llpathfindingcharacterlist.h b/indra/newview/llpathfindingcharacterlist.h
index 734cfcafa1..4ecf70001d 100644
--- a/indra/newview/llpathfindingcharacterlist.h
+++ b/indra/newview/llpathfindingcharacterlist.h
@@ -1,30 +1,29 @@
/**
- * @file llpathfindingcharacterlist.h
- * @author William Todd Stinson
- * @brief Class to implement the list of a set of pathfinding characters
- *
- * $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 llpathfindingcharacterlist.h
+* @brief Header file for llpathfindingcharacterlist
+* @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$
+*/
#ifndef LL_LLPATHFINDINGCHARACTERLIST_H
#define LL_LLPATHFINDINGCHARACTERLIST_H
diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp
index 4cb749b3ca..fe4daabd89 100644
--- a/indra/newview/llpathfindinglinkset.cpp
+++ b/indra/newview/llpathfindinglinkset.cpp
@@ -1,29 +1,30 @@
/**
- * @file llpathfindinglinksets.cpp
- * @author William Todd Stinson
- * @brief Definition of a pathfinding linkset that contains various properties required for havok pathfinding.
- *
- * $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 llpathfindinglinkset.cpp
+* @brief Definition of a pathfinding linkset that contains various properties required for havok pathfinding.
+* @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"
diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h
index 03c526560c..73b4d6bad4 100644
--- a/indra/newview/llpathfindinglinkset.h
+++ b/indra/newview/llpathfindinglinkset.h
@@ -1,30 +1,29 @@
/**
- * @file llpathfindinglinkset.h
- * @author William Todd Stinson
- * @brief Definition of a pathfinding linkset that contains various properties required for havok pathfinding.
- *
- * $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 llpathfindinglinkset.h
+* @brief Definition of a pathfinding linkset that contains various properties required for havok pathfinding.
+* @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$
+*/
#ifndef LL_LLPATHFINDINGLINKSET_H
#define LL_LLPATHFINDINGLINKSET_H
diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp
index 5323635438..746fa342a1 100644
--- a/indra/newview/llpathfindinglinksetlist.cpp
+++ b/indra/newview/llpathfindinglinksetlist.cpp
@@ -1,29 +1,30 @@
/**
- * @file llpathfindinglinksetlist.cpp
- * @author William Todd Stinson
- * @brief Class to implement the list of a set of pathfinding linksets
- *
- * $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 llpathfindinglinksetlist.cpp
+* @brief Implementation of llpathfindinglinksetlist
+* @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"
diff --git a/indra/newview/llpathfindinglinksetlist.h b/indra/newview/llpathfindinglinksetlist.h
index 50a8e069d0..77c6358640 100644
--- a/indra/newview/llpathfindinglinksetlist.h
+++ b/indra/newview/llpathfindinglinksetlist.h
@@ -1,30 +1,29 @@
/**
- * @file llpathfindinglinksetlist.h
- * @author William Todd Stinson
- * @brief Class to implement the list of a set of pathfinding linksets
- *
- * $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 llpathfindinglinksetlist.h
+* @brief Header file for llpathfindinglinksetlist
+* @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$
+*/
#ifndef LL_LLPATHFINDINGLINKSETLIST_H
#define LL_LLPATHFINDINGLINKSETLIST_H
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index bafcf57944..2dd01e931e 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"
@@ -32,7 +33,9 @@
#include <string>
#include <map>
+#include <boost/bind.hpp>
#include <boost/function.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
@@ -52,8 +55,6 @@
#include "lluuid.h"
#include "llviewerregion.h"
#include "llweb.h"
-#include "llpanelnavmeshrebake.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))
+ {
+ pRebakeNavMeshCallback(false);
+ }
+ else
{
- LLSD mPostData;
- mPostData["command"] = "rebuild";
+ 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);
}
-
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 9aa3065d89..c61ff244fc 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -1,30 +1,29 @@
-/**
- * @file llpathfindingmanager.h
- * @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.h
+* @brief Header file for 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$
+*/
#ifndef LL_LLPATHFINDINGMANAGER_H
#define LL_LLPATHFINDINGMANAGER_H
@@ -38,12 +37,10 @@
#include "llpathfindingobjectlist.h"
#include "llpathfindingnavmesh.h"
#include "llsingleton.h"
-#include "lluuid.h"
-#include "llpanel.h"
-#include "llmoveview.h"
-class LLViewerRegion;
class LLPathfindingNavMeshStatus;
+class LLUUID;
+class LLViewerRegion;
class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
{
@@ -52,8 +49,6 @@ class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
friend class LLAgentStateChangeNode;
friend class AgentStateResponder;
public:
- typedef std::map<LLUUID, LLPathfindingNavMeshPtr> NavMeshMap;
-
typedef enum {
kRequestStarted,
kRequestCompleted,
@@ -97,6 +92,8 @@ public:
protected:
private:
+ typedef std::map<LLUUID, LLPathfindingNavMeshPtr> NavMeshMap;
+
void sendRequestGetNavMeshForRegion(LLPathfindingNavMeshPtr navMeshPtr, LLViewerRegion *pRegion, const LLPathfindingNavMeshStatus &pNavMeshStatus);
void handleDeferredGetAgentStateForRegion(const LLUUID &pRegionUUID);
diff --git a/indra/newview/llpathfindingnavmesh.cpp b/indra/newview/llpathfindingnavmesh.cpp
index 4e4e9fceef..e01dd3a152 100644
--- a/indra/newview/llpathfindingnavmesh.cpp
+++ b/indra/newview/llpathfindingnavmesh.cpp
@@ -1,38 +1,42 @@
-/**
- * @file llpathfindingnavmesh.cpp
- * @author William Todd Stinson
- * @brief A class for representing the navmesh of a pathfinding region.
- *
- * $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 llpathfindingnavmesh.cpp
+* @brief Implementation of llpathfindingnavmesh
+* @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"
-#include "lluuid.h"
+
#include "llpathfindingnavmesh.h"
-#include "llpathfindingnavmeshstatus.h"
-#include "llsdserialize.h"
#include <string>
+#include "llpathfindingnavmeshstatus.h"
+#include "llsd.h"
+#include "llsdserialize.h"
+#include "lluuid.h"
+
#define NAVMESH_VERSION_FIELD "navmesh_version"
#define NAVMESH_DATA_FIELD "navmesh_data"
@@ -116,6 +120,7 @@ void LLPathfindingNavMesh::handleNavMeshStart(const LLPathfindingNavMeshStatus &
void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMeshVersion)
{
+ llassert(pContent.has(NAVMESH_VERSION_FIELD));
if (pContent.has(NAVMESH_VERSION_FIELD))
{
llassert(pContent.get(NAVMESH_VERSION_FIELD).isInteger());
@@ -198,4 +203,3 @@ void LLPathfindingNavMesh::sendStatus()
{
mNavMeshSignal(mNavMeshRequestStatus, mNavMeshStatus, mNavMeshData);
}
-
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index 02b403ab75..7a844f54ce 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -1,35 +1,32 @@
-/**
- * @file llpathfindingnavmesh.h
- * @author William Todd Stinson
- * @brief A class for representing the navmesh of a pathfinding region.
- *
- * $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 llpathfindingnavmesh.h
+* @brief Header file for llpathfindingnavmesh
+* @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$
+*/
#ifndef LL_LLPATHFINDINGNAVMESH_H
#define LL_LLPATHFINDINGNAVMESH_H
-#include "llsd.h"
-
#include <string>
#include <boost/shared_ptr.hpp>
@@ -37,9 +34,10 @@
#include <boost/signals2.hpp>
#include "llpathfindingnavmeshstatus.h"
+#include "llsd.h"
-class LLUUID;
class LLPathfindingNavMesh;
+class LLUUID;
typedef boost::shared_ptr<LLPathfindingNavMesh> LLPathfindingNavMeshPtr;
@@ -91,4 +89,3 @@ private:
};
#endif // LL_LLPATHFINDINGNAVMESH_H
-
diff --git a/indra/newview/llpathfindingnavmeshstatus.cpp b/indra/newview/llpathfindingnavmeshstatus.cpp
index 5cddb995a4..2eaa6075ca 100644
--- a/indra/newview/llpathfindingnavmeshstatus.cpp
+++ b/indra/newview/llpathfindingnavmeshstatus.cpp
@@ -1,38 +1,41 @@
/**
- * @file llpathfindingnavmeshstatus.cpp
- * @author William Todd Stinson
- * @brief A class for representing the navmesh status of a pathfinding region.
- *
- * $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 llpathfindingnavmeshstatus.cpp
+* @brief Implementation of llpathfindingnavmeshstatus
+* @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"
-#include "llsd.h"
-#include "lluuid.h"
-#include "llstring.h"
+
#include "llpathfindingnavmeshstatus.h"
#include <string>
+#include "llsd.h"
+#include "llstring.h"
+#include "lluuid.h"
+
#define REGION_FIELD "region_id"
#define STATUS_FIELD "status"
#define VERSION_FIELD "version"
diff --git a/indra/newview/llpathfindingnavmeshstatus.h b/indra/newview/llpathfindingnavmeshstatus.h
index 837fc43cc5..74533fa484 100644
--- a/indra/newview/llpathfindingnavmeshstatus.h
+++ b/indra/newview/llpathfindingnavmeshstatus.h
@@ -1,37 +1,36 @@
/**
- * @file llpathfindingnavmeshstatus.h
- * @author William Todd Stinson
- * @brief A class for representing the navmesh status of a pathfinding region.
- *
- * $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 llpathfindingnavmeshstatus.h
+* @brief Header file for llpathfindingnavmeshstatus
+* @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$
+*/
#ifndef LL_LLPATHFINDINGNAVMESHSTATUS_H
#define LL_LLPATHFINDINGNAVMESHSTATUS_H
-#include "lluuid.h"
-
#include <string>
+#include "lluuid.h"
+
class LLSD;
class LLPathfindingNavMeshStatus
diff --git a/indra/newview/llpathfindingnavmeshzone.cpp b/indra/newview/llpathfindingnavmeshzone.cpp
index d8670062e9..e190dbba65 100644
--- a/indra/newview/llpathfindingnavmeshzone.cpp
+++ b/indra/newview/llpathfindingnavmeshzone.cpp
@@ -1,46 +1,51 @@
/**
- * @file llpathfindingnavmeshzone.cpp
- * @author William Todd Stinson
- * @brief A class for representing the zone of navmeshes containing and possible surrounding the current region.
- *
- * $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 llpathfindingnavmeshzone.cpp
+* @brief Implementation of llpathfindingnavmeshzone
+* @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"
-#include "llsd.h"
-#include "lluuid.h"
-#include "llagent.h"
-#include "llviewerregion.h"
-#include "llpathfindingnavmesh.h"
-#include "llpathfindingnavmeshzone.h"
-#include "llpathfindingmanager.h"
-#include "llviewercontrol.h"
-#include "llpathinglib.h"
+#include "llpathfindingnavmeshzone.h"
-#include <string>
#include <vector>
#include <boost/bind.hpp>
+#include <boost/function.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/signals2.hpp>
+
+#include "llagent.h"
+#include "llpathfindingmanager.h"
+#include "llpathfindingnavmesh.h"
+#include "llpathfindingnavmeshstatus.h"
+#include "llpathinglib.h"
+#include "llsd.h"
+#include "lluuid.h"
+#include "llviewercontrol.h"
+#include "llviewerregion.h"
#define CENTER_REGION 99
@@ -71,7 +76,7 @@ void LLPathfindingNavMeshZone::initialize()
NavMeshLocationPtr centerNavMeshPtr(new NavMeshLocation(CENTER_REGION, boost::bind(&LLPathfindingNavMeshZone::handleNavMeshLocation, this)));
mNavMeshLocationPtrs.push_back(centerNavMeshPtr);
- U32 neighborRegionDir = gSavedSettings.getU32("RetrieveNeighboringRegion");
+ U32 neighborRegionDir = gSavedSettings.getU32("PathfindingRetrieveNeighboringRegion");
if (neighborRegionDir != CENTER_REGION)
{
NavMeshLocationPtr neighborNavMeshPtr(new NavMeshLocation(neighborRegionDir, boost::bind(&LLPathfindingNavMeshZone::handleNavMeshLocation, this)));
@@ -101,7 +106,6 @@ void LLPathfindingNavMeshZone::disable()
void LLPathfindingNavMeshZone::refresh()
{
- llassert(LLPathingLib::getInstance() != NULL);
if (LLPathingLib::getInstance() != NULL)
{
LLPathingLib::getInstance()->cleanupResidual();
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index d4e7a717b2..baa1cc5979 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -1,46 +1,44 @@
-/**
- * @file llpathfindingnavmeshzone.h
- * @author William Todd Stinson
- * @brief A class for representing the zone of navmeshes containing and possible surrounding the current region.
- *
- * $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 llpathfindingnavmeshzone.h
+* @brief Header file for llpathfindingnavmeshzone
+* @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$
+*/
#ifndef LL_LLPATHFINDINGNAVMESHZONE_H
#define LL_LLPATHFINDINGNAVMESHZONE_H
-#include "llsd.h"
-#include "lluuid.h"
-#include "llpathfindingnavmesh.h"
-#include "llpathfindingnavmeshstatus.h"
-#include "llviewerregion.h"
-
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/signals2.hpp>
-class LLPathfindingNavMeshStatus;
+#include "llpathfindingnavmesh.h"
+#include "llpathfindingnavmeshstatus.h"
+#include "llsd.h"
+#include "lluuid.h"
+
+class LLViewerRegion;
class LLPathfindingNavMeshZone
{
@@ -128,4 +126,3 @@ private:
};
#endif // LL_LLPATHFINDINGNAVMESHZONE_H
-
diff --git a/indra/newview/llpathfindingobject.cpp b/indra/newview/llpathfindingobject.cpp
index 65fcedf2f5..c2f509c951 100644
--- a/indra/newview/llpathfindingobject.cpp
+++ b/indra/newview/llpathfindingobject.cpp
@@ -32,11 +32,11 @@
#include <string>
-#include "v3math.h"
#include "llavatarname.h"
#include "llavatarnamecache.h"
#include "llsd.h"
#include "lluuid.h"
+#include "v3math.h"
#define PATHFINDING_OBJECT_NAME_FIELD "name"
#define PATHFINDING_OBJECT_DESCRIPTION_FIELD "description"
@@ -120,19 +120,10 @@ void LLPathfindingObject::parseObjectData(const LLSD &pObjectData)
llassert(pObjectData.get(PATHFINDING_OBJECT_DESCRIPTION_FIELD).isString());
mDescription = pObjectData.get(PATHFINDING_OBJECT_DESCRIPTION_FIELD).asString();
-#ifdef SERVER_SIDE_OWNER_ROLLOUT_COMPLETE
llassert(pObjectData.has(PATHFINDING_OBJECT_OWNER_FIELD));
llassert(pObjectData.get(PATHFINDING_OBJECT_OWNER_FIELD).isUUID());
mOwnerUUID = pObjectData.get(PATHFINDING_OBJECT_OWNER_FIELD).asUUID();
- LLAvatarNameCache::get(mOwnerUUID, &mOwnerName);
-#else // SERVER_SIDE_OWNER_ROLLOUT_COMPLETE
- if (pObjectData.has(PATHFINDING_OBJECT_OWNER_FIELD))
- {
- llassert(pObjectData.get(PATHFINDING_OBJECT_OWNER_FIELD).isUUID());
- mOwnerUUID = pObjectData.get(PATHFINDING_OBJECT_OWNER_FIELD).asUUID();
- fetchOwnerName();
- }
-#endif // SERVER_SIDE_OWNER_ROLLOUT_COMPLETE
+ fetchOwnerName();
llassert(pObjectData.has(PATHFINDING_OBJECT_POSITION_FIELD));
llassert(pObjectData.get(PATHFINDING_OBJECT_POSITION_FIELD).isArray());
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 924ea3f298..4b2d546bb1 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -27,14 +27,14 @@
#ifndef LL_LLPATHFINDINGOBJECT_H
#define LL_LLPATHFINDINGOBJECT_H
-#include "llavatarname.h"
-#include "lluuid.h"
-#include "v3math.h"
-
#include <string>
#include <boost/shared_ptr.hpp>
+#include "llavatarname.h"
+#include "lluuid.h"
+#include "v3math.h"
+
class LLPathfindingObject;
class LLSD;
diff --git a/indra/newview/llpathfindingobjectlist.h b/indra/newview/llpathfindingobjectlist.h
index 94c53f3aba..3ad8e8b096 100644
--- a/indra/newview/llpathfindingobjectlist.h
+++ b/indra/newview/llpathfindingobjectlist.h
@@ -34,7 +34,6 @@
#include "llpathfindingobject.h"
-class LLSD;
class LLPathfindingObjectList;
typedef boost::shared_ptr<LLPathfindingObjectList> LLPathfindingObjectListPtr;
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 6cf90addab..006755e20b 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -1,44 +1,46 @@
/**
- * @file llpathfindingpathtool.cpp
- * @author William Todd Stinson
- * @brief XXX
- *
- * $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 llpathfindingpathtool.cpp
+* @brief Implementation of llpathfindingpathtool
+* @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"
+
#include "llpathfindingpathtool.h"
+#include <boost/function.hpp>
+#include <boost/signals2.hpp>
+
#include "llagent.h"
+#include "llpathfindingmanager.h"
+#include "llpathinglib.h"
#include "llsingleton.h"
#include "lltool.h"
#include "llviewercamera.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
-#include "llpathfindingmanager.h"
-#include "llpathinglib.h"
-
-#include <boost/function.hpp>
-#include <boost/signals2.hpp>
#define PATH_TOOL_NAME "PathfindingPathTool"
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 8a79da43c9..97284265f1 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -1,40 +1,39 @@
/**
- * @file llpathfindingpathtool.h
- * @author William Todd Stinson
- * @brief XXX
- *
- * $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 llpathfindingpathtool.h
+* @brief Header file for llpathfindingpathtool
+* @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$
+*/
#ifndef LL_LLPATHFINDINGPATHTOOL_H
#define LL_LLPATHFINDINGPATHTOOL_H
-#include "llsingleton.h"
-#include "lltool.h"
-#include "llpathinglib.h"
-
#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include "llpathinglib.h"
+#include "llsingleton.h"
+#include "lltool.h"
+
class LLPathfindingPathTool : public LLTool, public LLSingleton<LLPathfindingPathTool>
{
public:
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 4ef2a26535..aba43a9715 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -52,7 +52,6 @@
#include "llworld.h"
#include "llappviewer.h"
#include "llparcel.h"
-#include "llpathfindingmanager.h"
#include "llglheaders.h"
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index a3661fd15d..9a45d40b65 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -77,7 +77,6 @@
#include "llwlparammanager.h"
#include "llwaterparammanager.h"
#include "llpostprocess.h"
-#include "llpathfindingmanager.h"
extern LLPointer<LLViewerTexture> gStartTexture;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index bcec9c6eda..06ffd2df92 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2804,12 +2804,12 @@ bool enable_object_build()
bool enable_object_select_in_pathfinding_linksets()
{
- return LLSelectMgr::getInstance()->selectGetNonCharacter();
+ return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetNonCharacter();
}
bool enable_object_select_in_pathfinding_characters()
{
- return LLSelectMgr::getInstance()->selectGetCharacter();
+ return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetCharacter();
}
class LLSelfRemoveAllAttachments : public view_listener_t
@@ -7086,8 +7086,8 @@ BOOL enable_save_into_inventory(void*)
return TRUE;
}
}
-#endif
return FALSE;
+#endif
}
class LLToolsEnableSaveToInventory : public view_listener_t
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 0382d837fa..97f4c3e5fe 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -36,7 +36,7 @@
/// key used to store the grid, and the name attribute in the grid data
-const std::string GRID_VALUE = "name";
+const std::string GRID_VALUE = "keyname";
/// the value displayed in the grid selector menu, and other human-oriented text
const std::string GRID_LABEL_VALUE = "label";
/// the value used on the --grid command line argument
@@ -154,15 +154,13 @@ void LLGridManager::initialize(const std::string& grid_file)
{
LL_WARNS("GridManager") << "Cannot override existing grid '" << key_name << "'; ignoring definition from '"<<grid_file<<"'" << LL_ENDL;
}
+ else if ( addGrid(grid) )
+ {
+ LL_INFOS("GridManager") << "added grid '"<<key_name<<"'"<<LL_ENDL;
+ }
else
{
- try
- {
- addGrid(grid); // does all the logging that's needed
- }
- catch (...)
- {
- }
+ LL_WARNS("GridManager") << "failed to add invalid grid '"<<key_name<<"'"<<LL_ENDL;
}
}
llsd_xml.close();
@@ -245,8 +243,9 @@ LLGridManager::~LLGridManager()
// if they're not populated yet.
//
-void LLGridManager::addGrid(LLSD& grid_data)
+bool LLGridManager::addGrid(LLSD& grid_data)
{
+ bool added = false;
if (grid_data.isMap() && grid_data.has(GRID_VALUE))
{
std::string grid = utf8str_tolower(grid_data[GRID_VALUE].asString());
@@ -307,6 +306,7 @@ void LLGridManager::addGrid(LLSD& grid_data)
}
LL_CONT << LL_ENDL;
mGridList[grid] = grid_data;
+ added = true;
}
else
{
@@ -320,8 +320,9 @@ void LLGridManager::addGrid(LLSD& grid_data)
}
else
{
- LL_WARNS("GridManager")<<"invalid value passed"<<LL_ENDL;
+ LL_WARNS("GridManager")<<"invalid grid definition ignored"<<LL_ENDL;
}
+ return added;
}
//
@@ -362,6 +363,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
{
grid[GRID_SLURL_BASE] = llformat(SYSTEM_GRID_SLURL_BASE, grid[GRID_ID_VALUE].asString().c_str());
}
+
addGrid(grid);
}
@@ -427,14 +429,6 @@ std::string LLGridManager::getGrid( const std::string &grid )
}
}
}
- if (grid_name.empty())
- {
- LL_WARNS("GridManager")<<"No name found for grid '"<<grid<<"'"<<LL_ENDL;
- }
- else
- {
- LL_DEBUGS("GridManager")<<"grid '"<<grid<<"' name is '"<<grid_name<<"'"<<LL_ENDL;
- }
return grid_name;
}
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 3fc5492952..3f56103b2e 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -195,8 +195,9 @@ class LLGridManager : public LLSingleton<LLGridManager>
private:
- /// Add a grid to the list of grids
- void addGrid(LLSD& grid_info);
+ /// Add a grid to the list of grids
+ bool addGrid(LLSD& grid_info);
+ ///< @returns true if successfully added
void updateIsInProductionGrid();
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 2c4392ad33..8d658adc8f 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -100,7 +100,6 @@
#include "lltrans.h"
#include "llsdutil.h"
#include "llmediaentry.h"
-#include "llpathfindingmanager.h"
//#define DEBUG_UPDATE_TYPE
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 427afb96bc..5315568667 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -126,7 +126,7 @@
#include "llmorphview.h"
#include "llmoveview.h"
#include "llnavigationbar.h"
-#include "llpanelnavmeshrebake.h"
+#include "llpanelpathfindingrebakenavmesh.h"
#include "llpaneltopinfobar.h"
#include "llpopupview.h"
#include "llpreviewtexture.h"
@@ -1929,7 +1929,7 @@ void LLViewerWindow::initWorldUI()
LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance();
panel_ssf_container->addChild(panel_stand_stop_flying);
- LLPanelNavMeshRebake *panel_rebake_navmesh = LLPanelNavMeshRebake::getInstance();
+ LLPanelPathfindingRebakeNavmesh *panel_rebake_navmesh = LLPanelPathfindingRebakeNavmesh::getInstance();
panel_ssf_container->addChild(panel_rebake_navmesh);
panel_ssf_container->setVisible(TRUE);
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index b76f04d17f..66bd519dbc 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -140,10 +140,7 @@ with the same filename but different name
<texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" />
<texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" />
<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_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" />
<texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" />
<texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" />
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
index c1f1f60c1b..4331e1f340 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
@@ -150,14 +150,14 @@
left_pad="0"
width="150" />
<check_box
- height="19"
- follows="left|bottom"
- label="Show physics capsule"
- layout="topleft"
- name="show_physics_capsule"
- top_pad="-19"
- left_pad="0"
- width="150" />
+ height="19"
+ follows="left|bottom"
+ label="Show physics capsule"
+ layout="topleft"
+ name="show_physics_capsule"
+ top_pad="-19"
+ left_pad="0"
+ width="150" />
<button
follows="left|bottom"
height="22"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index c49ce90e6b..a2fc16ac01 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1402,7 +1402,7 @@ even though the user gets a free copy.
height="10"
layout="topleft"
name="label position"
- top_pad="5"
+ top_pad="10"
width="121">
Position (meters)
</text>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index b09fb7bbe8..837637a54e 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1533,9 +1533,7 @@ Please make sure none are locked, and that you own all of them.
icon="alertmodal.tga"
name="CannotLinkPermanent"
type="alertmodal">
-Unable to link permanent objects.
-
-Please move all objects to the same region, and then attempt to link the objects together again.
+ Objects cannot be linked across region boundaries.
<tag>fail</tag>
</notification>
@@ -5820,7 +5818,7 @@ This area has building disabled. You can&apos;t build or rez objects here.
persist="true"
type="notify">
<unique/>
- The pathfinding navmesh has pending changes and is not up-to-date on the current region. If you have build rights, you may rebake the navmesh by clicking on the “Clean up region” button.
+ The region has pending pathfinding changes. If you have build rights, you may rebake the region by clicking on the “Rebake region” button.
</notification>
<notification
@@ -5829,7 +5827,7 @@ This area has building disabled. You can&apos;t build or rez objects here.
persist="true"
type="notify">
<unique/>
- Dynamic pathfinding is not enabled on this region. Scripted objects with pathfinding LSL calls may not operate as expected on this region.
+ Dynamic pathfinding is not enabled on this region. Scripted objects using pathfinding LSL calls may not operate as expected on this region.
</notification>
<notification
@@ -5837,7 +5835,7 @@ This area has building disabled. You can&apos;t build or rez objects here.
name="PathfindingRebakeNavmesh"
type="alertmodal">
<unique/>
- Changing certain objects in this region could cause other moving objects to behave incorrectly. To make such objects work again, click the “Clean up region” button. Choose “Help” to read more information.
+ Changing certain objects in this region could cause other moving objects to behave incorrectly. To make moving objects behave correctly, click the “Rebake region” button. Choose “Help” for more information.
<url
option="1"
name="url"
@@ -5853,6 +5851,18 @@ This area has building disabled. You can&apos;t build or rez objects here.
</notification>
<notification
+ icon="alertmodal.tga"
+ name="PathfindingCannotRebakeNavmesh"
+ type="alertmodal">
+ <unique/>
+ An error occurred. There may be a network or server problem, or you may not have build rights. Sometimes logging out and back in will solve this problem.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"
+ />
+ </notification>
+
+ <notification
icon="notify.tga"
name="SeeAvatars"
persist="true"
@@ -7765,7 +7775,7 @@ The site at &apos;&lt;nolink&gt;[HOST_NAME]&lt;/nolink&gt;&apos; in realm &apos;
Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset. These linksets will be set to be '[RESTRICTED_TYPE]' instead.
<tag>confirm</tag>
<usetemplate
- ignoretext="Do you wish to proceed?"
+ ignoretext="Some selected linksets cannot be set because of permission restrictions on the linkset."
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
@@ -7775,10 +7785,10 @@ The site at &apos;&lt;nolink&gt;[HOST_NAME]&lt;/nolink&gt;&apos; in realm &apos;
icon="alertmodal.tga"
name="PathfindingLinksets_SetLinksetUseMismatchOnVolume"
type="alertmodal">
- Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of the shape is non-convex.
+ Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex.
<tag>confirm</tag>
<usetemplate
- ignoretext="Do you wish to proceed?"
+ ignoretext="Some selected linksets cannot be set because the shape is non-convex"
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
@@ -7789,10 +7799,10 @@ The site at &apos;&lt;nolink&gt;[HOST_NAME]&lt;/nolink&gt;&apos; in realm &apos;
name="PathfindingLinksets_SetLinksetUseMismatchOnRestrictedAndVolume"
type="alertmodal">
Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset. These linksets will be set to be '[RESTRICTED_TYPE]' instead.
- Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of the shape is non-convex. These linksets use types will not change.
+ Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex. These linksets&apos; use types will not change.
<tag>confirm</tag>
<usetemplate
- ignoretext="Do you wish to proceed?"
+ ignoretext="Some selected linksets cannot be set because of permission restrictions on the linkset and because the shape is non-convex."
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
@@ -7802,10 +7812,10 @@ The site at &apos;&lt;nolink&gt;[HOST_NAME]&lt;/nolink&gt;&apos; in realm &apos;
icon="alertmodal.tga"
name="PathfindingLinksets_ChangeToFlexiblePath"
type="alertmodal">
- The selected object is marked as permanent and is included in the navmesh. Setting the object to be a Flexible Path will unset the permanent value and remove the object from the navmesh. Do you wish to proceed?
+ The selected object affects the navmesh. Changing it to a Flexible Path will remove it from the navmesh.
<tag>confirm</tag>
<usetemplate
- ignoretext="Do you wish to proceed?"
+ ignoretext="The selected object affects the navmesh. Changing it to a Flexible Path will remove it from the navmesh."
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
diff --git a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
index c7bf91efb4..90308a2ca9 100644
--- a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
+++ b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
@@ -9,26 +9,37 @@
<button
follows="left|bottom"
height="19"
- label="Clean up region"
+ label="Rebake region"
layout="topleft"
left="10"
name="navmesh_btn"
- tool_tip="Click here to rebake the region&apos;s navmesh."
+ tool_tip="Click to rebake the region&apos;s navmesh."
top="2"
visible="false"
enabled="true"
- width="113" />
+ width="120" />
<button
follows="left|bottom"
height="19"
- label="Region is cleaning"
+ label="Requesting rebake"
+ layout="topleft"
+ left="10"
+ name="navmesh_btn_sending"
+ tool_tip="Sending rebake request to the server."
+ top="2"
+ visible="false"
+ enabled="false"
+ width="120" />
+ <button
+ follows="left|bottom"
+ height="19"
+ label="Region is rebaking"
layout="topleft"
left="10"
name="navmesh_btn_baking"
- tool_tip="Region is cleaning up."
+ tool_tip="Region is being rebaked. When completed, this button will disappear."
top="2"
visible="false"
enabled="false"
- width="113" />
+ width="120" />
</panel>
-
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 1f168b0ccd..064cea5ae7 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3326,7 +3326,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="LocationCtrlModerateIconTooltip">Moderate Region</string>
<string name="LocationCtrlGeneralIconTooltip">General Region</string>
<string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string>
- <string name="LocationCtrlPathfindingDirtyTooltip">Objects that move may not behave correctly in this region until the region is cleaned up.</string>
+ <string name="LocationCtrlPathfindingDirtyTooltip">Objects that move may not behave correctly in this region until the region is rebaked.</string>
<string name="LocationCtrlPathfindingDisabledTooltip">Dynamic pathfinding is not enabled on this region.</string>
<!-- Strings used by the (currently Linux) auto-updater app -->
<string name="UpdaterWindowTitle">
@@ -3832,10 +3832,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_MiniMap_Label">Mini-map</string>
<string name="Command_Move_Label">Walk / run / fly</string>
<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_Characters_Label">Pathfinding Characters</string>
- <string name="Command_PF_Linksets_Label">Pathfinding Linksets</string>
<string name="Command_Picks_Label">Picks</string>
<string name="Command_Places_Label">Places</string>
<string name="Command_Preferences_Label">Preferences</string>
@@ -3861,10 +3858,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_MiniMap_Tooltip">Show nearby people</string>
<string name="Command_Move_Tooltip">Moving your avatar</string>
<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_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>
<string name="Command_Places_Tooltip">Places you've saved</string>
<string name="Command_Preferences_Tooltip">Preferences</string>
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index c970d79975..564a49896c 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -84,19 +84,25 @@ namespace tut
LLAgentAccess aa(cgr);
cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 prefersPG", aa.prefersPG());
ensure("1 prefersMature", !aa.prefersMature());
ensure("1 prefersAdult", !aa.prefersAdult());
+#endif // HACKED_GODLIKE_VIEWER
cgr.setU32("PreferredMaturity", SIM_ACCESS_MATURE);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("2 prefersPG", !aa.prefersPG());
ensure("2 prefersMature", aa.prefersMature());
ensure("2 prefersAdult", !aa.prefersAdult());
+#endif // HACKED_GODLIKE_VIEWER
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("3 prefersPG", !aa.prefersPG());
ensure("3 prefersMature", aa.prefersMature());
ensure("3 prefersAdult", aa.prefersAdult());
+#endif // HACKED_GODLIKE_VIEWER
}
template<> template<>
@@ -107,45 +113,59 @@ namespace tut
LLAgentAccess aa(cgr);
// make sure default is PG
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 isTeen", aa.isTeen());
ensure("1 isMature", !aa.isMature());
ensure("1 isAdult", !aa.isAdult());
+#endif // HACKED_GODLIKE_VIEWER
// this is kinda bad -- setting this forces maturity to MATURE but !teen != Mature anymore
aa.setTeen(false);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("2 isTeen", !aa.isTeen());
ensure("2 isMature", aa.isMature());
ensure("2 isAdult", !aa.isAdult());
+#endif // HACKED_GODLIKE_VIEWER
// have to flip it back and make sure it still works
aa.setTeen(true);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("3 isTeen", aa.isTeen());
ensure("3 isMature", !aa.isMature());
ensure("3 isAdult", !aa.isAdult());
+#endif // HACKED_GODLIKE_VIEWER
// check the conversion routine
+#ifndef HACKED_GODLIKE_VIEWER
ensure_equals("1 conversion", SIM_ACCESS_PG, aa.convertTextToMaturity('P'));
ensure_equals("2 conversion", SIM_ACCESS_MATURE, aa.convertTextToMaturity('M'));
ensure_equals("3 conversion", SIM_ACCESS_ADULT, aa.convertTextToMaturity('A'));
ensure_equals("4 conversion", SIM_ACCESS_MIN, aa.convertTextToMaturity('Q'));
+#endif // HACKED_GODLIKE_VIEWER
// now try the other method of setting it - PG
aa.setMaturity('P');
ensure("4 isTeen", aa.isTeen());
+#ifndef HACKED_GODLIKE_VIEWER
ensure("4 isMature", !aa.isMature());
ensure("4 isAdult", !aa.isAdult());
+#endif // HACKED_GODLIKE_VIEWER
// Mature
aa.setMaturity('M');
+#ifndef HACKED_GODLIKE_VIEWER
ensure("5 isTeen", !aa.isTeen());
ensure("5 isMature", aa.isMature());
ensure("5 isAdult", !aa.isAdult());
+#endif // HACKED_GODLIKE_VIEWER
// Adult
aa.setMaturity('A');
+#ifndef HACKED_GODLIKE_VIEWER
ensure("6 isTeen", !aa.isTeen());
ensure("6 isMature", aa.isMature());
ensure("6 isAdult", aa.isAdult());
+#endif // HACKED_GODLIKE_VIEWER
}
@@ -156,21 +176,35 @@ namespace tut
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
LLAgentAccess aa(cgr);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("starts normal", !aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
aa.setGodLevel(GOD_NOT);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("stays normal", !aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
aa.setGodLevel(GOD_FULL);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("sets full", aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
aa.setGodLevel(GOD_NOT);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("resets normal", !aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
aa.setAdminOverride(true);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("admin true", aa.getAdminOverride());
ensure("overrides 1", aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
aa.setGodLevel(GOD_FULL);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("overrides 2", aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
aa.setAdminOverride(false);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("admin false", !aa.getAdminOverride());
ensure("overrides 3", aa.isGodlike());
+#endif // HACKED_GODLIKE_VIEWER
}
template<> template<>
@@ -180,55 +214,73 @@ namespace tut
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
LLAgentAccess aa(cgr);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 pg to start", aa.wantsPGOnly());
ensure("2 pg to start", !aa.canAccessMature());
ensure("3 pg to start", !aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
aa.setGodLevel(GOD_FULL);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 full god", !aa.wantsPGOnly());
ensure("2 full god", aa.canAccessMature());
ensure("3 full god", aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
aa.setGodLevel(GOD_NOT);
aa.setAdminOverride(true);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 admin mode", !aa.wantsPGOnly());
ensure("2 admin mode", aa.canAccessMature());
ensure("3 admin mode", aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
aa.setAdminOverride(false);
aa.setMaturity('M');
// preferred is still pg by default
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 mature pref pg", aa.wantsPGOnly());
ensure("2 mature pref pg", !aa.canAccessMature());
ensure("3 mature pref pg", !aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
cgr.setU32("PreferredMaturity", SIM_ACCESS_MATURE);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 mature", !aa.wantsPGOnly());
ensure("2 mature", aa.canAccessMature());
ensure("3 mature", !aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 mature pref pg", aa.wantsPGOnly());
ensure("2 mature pref pg", !aa.canAccessMature());
ensure("3 mature pref pg", !aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
aa.setMaturity('A');
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 adult pref pg", aa.wantsPGOnly());
ensure("2 adult pref pg", !aa.canAccessMature());
ensure("3 adult pref pg", !aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 adult", !aa.wantsPGOnly());
ensure("2 adult", aa.canAccessMature());
ensure("3 adult", aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
// make sure that even if pref is high, if access is low we block access
// this shouldn't occur in real life but we want to be safe
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
aa.setMaturity('P');
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 pref adult, actual pg", aa.wantsPGOnly());
ensure("2 pref adult, actual pg", !aa.canAccessMature());
ensure("3 pref adult, actual pg", !aa.canAccessAdult());
+#endif // HACKED_GODLIKE_VIEWER
}
@@ -239,9 +291,13 @@ namespace tut
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
LLAgentAccess aa(cgr);
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 transition starts false", !aa.isInTransition());
+#endif // HACKED_GODLIKE_VIEWER
aa.setTransition();
+#ifndef HACKED_GODLIKE_VIEWER
ensure("2 transition now true", aa.isInTransition());
+#endif // HACKED_GODLIKE_VIEWER
}
template<> template<>
@@ -253,10 +309,14 @@ namespace tut
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
aa.setMaturity('M');
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 preferred maturity pegged to M when maturity is M", cgr.getU32("PreferredMaturity") == SIM_ACCESS_MATURE);
+#endif // HACKED_GODLIKE_VIEWER
aa.setMaturity('P');
+#ifndef HACKED_GODLIKE_VIEWER
ensure("1 preferred maturity pegged to P when maturity is P", cgr.getU32("PreferredMaturity") == SIM_ACCESS_PG);
+#endif // HACKED_GODLIKE_VIEWER
}
}
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index c9f49d9343..b7e81c4199 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -114,8 +114,9 @@ LLGridManager::~LLGridManager()
{
}
-void LLGridManager::addGrid(LLSD& grid_data)
+bool LLGridManager::addGrid(LLSD& grid_data)
{
+ return true;
}
LLGridManager::LLGridManager()
:
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index f995d8f0f5..09343ef227 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -93,7 +93,7 @@ const char *gSampleGridFile =
" <array>"
" <string>foobar/loginuri</string>"
" </array>"
- " <key>name</key><string>foo.bar.com</string>"
+ " <key>keyname</key><string>foo.bar.com</string>"
" <key>credential_type</key><string>agent</string>"
" <key>grid_login_id</key><string>FooBar</string>"
" </map>"
@@ -106,7 +106,7 @@ const char *gSampleGridFile =
" <array>"
" <string>mygrid/loginuri</string>"
" </array>"
- " <key>name</key><string>my.grid.com</string>"
+ " <key>keyname</key><string>my.grid.com</string>"
" <key>credential_type</key><string>agent</string>"
" <key>grid_login_id</key><string>MyGrid</string>"
" </map>"
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index 43d3b6522e..a1e97ea17e 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -95,13 +95,13 @@ const char *gSampleGridFile =
" <string>altgrid/myloginuri1</string>"
" <string>altgrid/myloginuri2</string>"
" </array>"
- " <key>name</key><string>altgrid.long.name</string>"
+ " <key>keyname</key><string>altgrid.long.name</string>"
" <key>credential_type</key><string>agent</string>"
" <key>grid_login_id</key><string>AltGrid</string>"
" </map>"
" <key>minimal.long.name</key>"
" <map>"
- " <key>name</key><string>minimal.long.name</string>"
+ " <key>keyname</key><string>minimal.long.name</string>"
" </map>"
" <!-- Note that the values for agni and aditi below are deliberately"
" incorrect to test that they are not overwritten -->"
@@ -115,7 +115,7 @@ const char *gSampleGridFile =
" <array>"
" <string>myloginuri</string>"
" </array>"
- " <key>name</key><string>util.agni.lindenlab.com</string> <!-- conflict -->"
+ " <key>keyname</key><string>util.agni.lindenlab.com</string> <!-- conflict -->"
" </map>"
" <key>util.foobar.lindenlab.com</key>"
" <map>"
@@ -127,7 +127,7 @@ const char *gSampleGridFile =
" <array>"
" <string>myloginuri</string>"
" </array>"
- " <key>name</key><string>util.foobar.lindenlab.com</string>"
+ " <key>keyname</key><string>util.foobar.lindenlab.com</string>"
" </map>"
" </map>"
"</llsd>"