diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 07c6d9ff939b4fe95ee0ba0dee96b9ac31619f1d..d37cf3b6181265f1d47d3a9aacb8527e192aaa8e 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) {