Skip to content

Commit d04a8fc

Browse files
committed
2 parents 6028ae7 + 919ffb3 commit d04a8fc

13 files changed

Lines changed: 125 additions & 58 deletions

autobuild.xml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,38 +1933,6 @@
19331933
<key>version</key>
19341934
<string>7.11.1.297294</string>
19351935
</map>
1936-
<key>modernjson</key>
1937-
<map>
1938-
<key>copyright</key>
1939-
<string>Copyright (c) 2013-2018 Niels Lohmann</string>
1940-
<key>description</key>
1941-
<string>JSON for Modern C++</string>
1942-
<key>license</key>
1943-
<string>MIT</string>
1944-
<key>license_file</key>
1945-
<string>LICENSES/modernjson.txt</string>
1946-
<key>name</key>
1947-
<string>modernjson</string>
1948-
<key>platforms</key>
1949-
<map>
1950-
<key>common</key>
1951-
<map>
1952-
<key>archive</key>
1953-
<map>
1954-
<key>hash</key>
1955-
<string>6f11eca7e2a6ca61f9217e949a64f026</string>
1956-
<key>hash_algorithm</key>
1957-
<string>md5</string>
1958-
<key>url</key>
1959-
<string>https://depot.alchemyviewer.org/pub/common/lib/modernjson-3.2.0-common-201809210551.tar.bz2</string>
1960-
</map>
1961-
<key>name</key>
1962-
<string>common</string>
1963-
</map>
1964-
</map>
1965-
<key>version</key>
1966-
<string>3.2.0</string>
1967-
</map>
19681936
<key>nvapi</key>
19691937
<map>
19701938
<key>copyright</key>

indra/cmake/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ set(cmake_SOURCE_FILES
5050
GooglePerfTools.cmake
5151
Hunspell.cmake
5252
JPEG.cmake
53-
Json.cmake
5453
LLAddBuildTest.cmake
5554
LLAppearance.cmake
5655
LLAudio.cmake

indra/deps/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ FetchContent_Declare(
1515
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
1616
GIT_TAG 6.1.2
1717
)
18+
FetchContent_Declare(
19+
nlohmann_json
20+
GIT_REPOSITORY https://github.com/nlohmann/json.git
21+
GIT_TAG v3.7.3
22+
)
1823
FetchContent_Declare(
1924
absl
2025
GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
21-
GIT_TAG 29235139149790f5afc430c11cec8f1eb1677607
26+
GIT_TAG 0033c9ea91a52ade7c6b725aa2ef3cbe15463421
2227
)
2328

2429
# This is a hack because absl has dumb cmake
@@ -44,5 +49,14 @@ if(WINDOWS)
4449
FetchContent_MakeAvailable(fmt)
4550
endif()
4651

52+
# Typically you don't care so much for a third party library's tests to be
53+
# run from your own project's code.
54+
set(JSON_BuildTests OFF CACHE INTERNAL "")
55+
56+
# If you only include this third party in PRIVATE source files, you do not
57+
# need to install it when your main project gets installed.
58+
set(JSON_Install OFF CACHE INTERNAL "")
59+
FetchContent_MakeAvailable(nlohmann_json)
60+
4761
unset(CMAKE_FOLDER)
4862
unset(CMAKE_POSITION_INDEPENDENT_CODE)

indra/llcommon/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ include(Linking)
1212
include(Boost)
1313
include(OpenSSL)
1414
include(LLSharedLibs)
15-
include(Json)
1615
include(Copy3rdPartyLibs)
1716
include(ZLIB)
1817
include(URIPARSER)
@@ -300,6 +299,7 @@ target_link_libraries(
300299
${Boost_SYSTEM_LIBRARY}
301300
${CORESERVICES_LIBRARY}
302301
${URIPARSER_LIBRARY}
302+
nlohmann_json::nlohmann_json
303303
${RT_LIBRARY}
304304
)
305305

indra/newview/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ include(FMODSTUDIO)
1818
include(GeneratePrecompiledHeader)
1919
include(GLOD)
2020
include(Hunspell)
21-
include(Json)
2221
include(LLAddBuildTest)
2322
include(LLAppearance)
2423
include(LLAudio)
@@ -63,7 +62,6 @@ include_directories(
6362
${STATEMACHINE_INCLUDE_DIRS}
6463
${DBUSGLIB_INCLUDE_DIRS}
6564
${ZLIB_INCLUDE_DIRS}
66-
${JSON_INCLUDE_DIR}
6765
${GLOD_INCLUDE_DIR}
6866
${LLAUDIO_INCLUDE_DIRS}
6967
${LLCHARACTER_INCLUDE_DIRS}
@@ -1710,6 +1708,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
17101708
${LLAPPEARANCE_LIBRARIES}
17111709
absl::flat_hash_map
17121710
absl::node_hash_map
1711+
nlohmann_json::nlohmann_json
17131712
${FMT_LIBRARY}
17141713
)
17151714

indra/newview/llfloaterinspect.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD&)
5858
mDirty(FALSE)
5959
{
6060
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
61+
mCommitCallbackRegistrar.add("Inspect.LastOwnerProfile", boost::bind(&LLFloaterInspect::onClickLastOwnerProfile, this));
6162
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
6263
mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
6364
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
@@ -166,6 +167,36 @@ void LLFloaterInspect::onClickOwnerProfile()
166167
}
167168
}
168169

170+
void LLFloaterInspect::onClickLastOwnerProfile()
171+
{
172+
if(mObjectList->getAllSelected().size() == 0) return;
173+
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
174+
175+
if (first_selected)
176+
{
177+
LLUUID selected_id = first_selected->getUUID();
178+
struct f : public LLSelectedNodeFunctor
179+
{
180+
LLUUID obj_id;
181+
f(const LLUUID& id) : obj_id(id) {}
182+
virtual bool apply(LLSelectNode* node)
183+
{
184+
return (obj_id == node->getObject()->getID());
185+
}
186+
} func(selected_id);
187+
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
188+
if(node)
189+
{
190+
const LLUUID& last_owner_id = node->mPermissions->getLastOwner();
191+
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
192+
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
193+
if (last_owner_id == node->mPermissions->getOwner()) return;
194+
// [/RLVa:KB]
195+
LLAvatarActions::showProfile(last_owner_id);
196+
}
197+
}
198+
}
199+
169200
void LLFloaterInspect::onSelectObject()
170201
{
171202
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)

indra/newview/llfloaterinspect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class LLFloaterInspect : public LLFloater, public LLFloaterSingleton<LLFloaterIn
6060
virtual void onFocusReceived();
6161
void onClickCreatorProfile();
6262
void onClickOwnerProfile();
63+
void onClickLastOwnerProfile();
6364
void onSelectObject();
6465

6566
LLScrollListCtrl* mObjectList;

indra/newview/llfloaternamedesc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ S32 LLFloaterNameDesc::getExpectedUploadCost() const
148148
LLAssetType::EType asset_type = exten == "wav" ? LLAssetType::AT_SOUND
149149
: (exten == "anim" || exten == "bvh") ? LLAssetType::AT_ANIMATION
150150
: exten != "lsl" ? LLAssetType::AT_TEXTURE
151-
: asset_type = LLAssetType::AT_NONE;
151+
: LLAssetType::AT_NONE;
152152
S32 upload_cost = -1;
153153

154154
if (asset_type != LLAssetType::AT_NONE)

indra/newview/llsurface.cpp

Lines changed: 59 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include "llglheaders.h"
5454
#include "lldrawpoolterrain.h"
5555
#include "lldrawable.h"
56+
#include "hippogridmanager.h"
5657

5758
extern LLPipeline gPipeline;
5859
extern bool gShiftFrame;
@@ -371,6 +372,14 @@ void LLSurface::connectNeighbor(LLSurface* neighborp, U32 direction)
371372
// - Non-power-of-2 regions should work here, but the rest of the viewer code will probably choke on them.
372373

373374
surface_patch_ref patchp, neighbor_patchp;
375+
if (mNeighbors[direction] == neighborp)
376+
{
377+
return;
378+
}
379+
if (mNeighbors[direction])
380+
{
381+
mNeighbors[direction]->disconnectNeighbor(this, gDirOpposite[direction]);
382+
}
374383
mNeighbors[direction] = neighborp;
375384

376385
const S32 max_idx = mPatchesPerEdge - 1;
@@ -480,33 +489,71 @@ void LLSurface::connectNeighbor(LLSurface* neighborp, U32 direction)
480489
}
481490
}
482491

483-
void LLSurface::disconnectNeighbor(LLSurface *surfacep)
492+
void LLSurface::disconnectNeighbor(LLSurface* surfacep, U32 direction)
484493
{
485-
S32 i;
486-
for (i = 0; i < 8; i++)
494+
if (surfacep && surfacep == mNeighbors[direction])
487495
{
488-
if (surfacep == mNeighbors[i])
496+
// Iterate through surface patches, removing any connectivity to removed surface.
497+
// Extra branches for debugging.
498+
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
489499
{
490-
mNeighbors[i] = NULL;
500+
for (auto& patchp : mPatchList)
501+
{
502+
patchp->disconnectNeighbor(surfacep);
503+
}
504+
}
505+
if (gHippoGridManager->getCurrentGrid()->isSecondLife())
506+
{
507+
for (auto& patchp : mPatchList)
508+
{
509+
patchp->disconnectNeighbor(surfacep);
510+
}
491511
}
492-
}
493-
494-
// Iterate through surface patches, removing any connectivity to removed surface.
495-
for (auto& patchp : mPatchList)
496-
{
497-
patchp->disconnectNeighbor(surfacep);
498512
}
499513
}
500514

501515

502516
void LLSurface::disconnectAllNeighbors()
503517
{
518+
// Pulled out of loop to debug.
519+
if (mNeighbors[EAST])
520+
{
521+
mNeighbors[EAST]->disconnectNeighbor(this, gDirOpposite[EAST]);
522+
}
523+
if (mNeighbors[NORTH])
524+
{
525+
mNeighbors[NORTH]->disconnectNeighbor(this, gDirOpposite[NORTH]);
526+
}
527+
if (mNeighbors[WEST])
528+
{
529+
mNeighbors[WEST]->disconnectNeighbor(this, gDirOpposite[WEST]);
530+
}
531+
if (mNeighbors[SOUTH])
532+
{
533+
mNeighbors[SOUTH]->disconnectNeighbor(this, gDirOpposite[SOUTH]);
534+
}
535+
if (mNeighbors[NORTHEAST])
536+
{
537+
mNeighbors[NORTHEAST]->disconnectNeighbor(this, gDirOpposite[NORTHEAST]);
538+
}
539+
if (mNeighbors[NORTHWEST])
540+
{
541+
mNeighbors[NORTHWEST]->disconnectNeighbor(this, gDirOpposite[NORTHWEST]);
542+
}
543+
if (mNeighbors[SOUTHWEST])
544+
{
545+
mNeighbors[SOUTHWEST]->disconnectNeighbor(this, gDirOpposite[SOUTHWEST]);
546+
}
547+
if (mNeighbors[SOUTHEAST])
548+
{
549+
mNeighbors[SOUTHEAST]->disconnectNeighbor(this, gDirOpposite[SOUTHEAST]);
550+
}
504551
S32 i;
505552
for (i = 0; i < 8; i++)
506553
{
507554
if (mNeighbors[i])
508555
{
509-
mNeighbors[i]->disconnectNeighbor(this);
556+
//mNeighbors[i]->disconnectNeighbor(this);
510557
mNeighbors[i] = NULL;
511558
}
512559
}

indra/newview/llsurface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class LLSurface
8585
void setOriginGlobal(const LLVector3d &origin_global);
8686

8787
void connectNeighbor(LLSurface *neighborp, U32 direction);
88-
void disconnectNeighbor(LLSurface *neighborp);
88+
void disconnectNeighbor(LLSurface *neighborp, U32 direction);
8989
void disconnectAllNeighbors();
9090

9191
// <FS:CR> Aurora Sim

0 commit comments

Comments
 (0)