summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2022-11-15 12:51:28 -0800
committerBrad Kittenbrink <brad@lindenlab.com>2022-11-15 12:51:28 -0800
commit911aba0c1c3ddaae61af487bb01bf689b7dd938f (patch)
treea7b7b6da9b24042a39552028895d79fcc9defff3 /indra/newview
parent3cc3e6a5e026e4d55aaa70663e33c432cbd23ab7 (diff)
SL-18458 VOCache cleanup region_handle message encoding.
Really wish there were a native way to send S64/U64 values in llsd.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llgltfmateriallist.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 07c6d9ff93..d37cf3b618 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -693,20 +693,13 @@ void LLGLTFMaterialList::writeCacheOverrides(LLSD const & message, std::string c
// default to main region if message doesn't specify
LLViewerRegion * region = gAgent.getRegion();;
- if (message.has("region_handle"))
+ if (message.has("region_handle_low") && message.has("region_handle_high"))
{
// TODO start requiring this once server sends this for all messages
- std::vector<U8> const & buffer = message["region_handle"].asBinary();
- if (buffer.size() == sizeof(U64))
- {
- U64 region_handle = ntohll(*reinterpret_cast<U64 const *>(&buffer[0]));
- region = LLWorld::instance().getRegionFromHandle(region_handle);
- }
- else
- {
- LL_WARNS() << "bad region_handle in material override message" << LL_ENDL;
- llassert(false);
- }
+ U64 region_handle_low = message["region_handle_low"].asInteger();
+ U64 region_handle_high = message["region_handle_high"].asInteger();
+ U64 region_handle = (region_handle_low & 0x00000000ffffffffUL) || (region_handle_high << 32);
+ region = LLWorld::instance().getRegionFromHandle(region_handle);
}
if (region) {