Compare commits

...

31 Commits

Author SHA1 Message Date
Liru Færs
a02693e4dd [Animesh] Hook up more missing parts of LLControlAvatar, maybe fix stuff? 2020-01-05 00:08:26 -05:00
Liru Færs
24118e8e67 [Animesh] Hook up isImposter override for control avatars 2020-01-05 00:07:36 -05:00
Liru Færs
19ad64cc96 AlchSync: Change dynamic_casts to LLVOVolume to asVolume() 2020-01-04 23:31:15 -05:00
Liru Færs
e81affce51 Harmless Alchemy sync
CachedControls, autos, cleaner loops, remove overkill dynamic cast,
and override and final
2020-01-04 23:25:29 -05:00
Liru Færs
dec0bff972 Fix Crash C: mRootVolp wasn't being set null on mark for death 2020-01-04 21:36:47 -05:00
Liru Færs
5daf4aa777 Fix a shutdown crash (Crash B) 2020-01-04 19:46:17 -05:00
Liru Færs
2f24a53a01 Clean up some code 2020-01-04 12:15:00 -05:00
Liru Færs
28af96229b Cleaner port of Ansariel's fix for Attachment loss on TP/Crossing 2020-01-04 12:07:59 -05:00
Liru Færs
6d776632a9 Fix incorrect Link number in build floater. 2020-01-04 09:39:11 -05:00
Liru Færs
1853500e10 Fix Crash A: mFolders was being used without a null check 2020-01-04 02:57:40 -05:00
Liru Færs
8e01fcb7f0 Merge branch 'master' of https://github.com/RouterGray/SingularityViewer 2020-01-02 01:55:02 -05:00
Liru Færs
3cddb0df2e Fix Crashes 1 and 5: LLTextEditor::replaceUrl, call to member
When a boost bind is converted into a suitable slot_function_type,
trackables will no longer be tracked, thus using ternary or static casts
breaks tracking, so old text editors were still receiving signals.
2020-01-01 21:35:07 -05:00
Liru Færs
37c4a4bbcb Fix possible unlinked and bad looking names in general tab of build tools 2020-01-01 13:07:49 -05:00
Router Gray
af8f0e1155 Fix gcc error 'extra qualification on member'. 2020-01-01 06:53:08 -06:00
Liru Færs
5df00a481d Code cleanup, now that erase is a member function 2020-01-01 02:59:52 -05:00
Liru Færs
d299c55ea4 Ve must erase ze kinderlach!!
Fixes Error 3, which was caused by deref of invalidated iterator
2020-01-01 02:59:23 -05:00
Liru Færs
d9d83a6807 Fix potential crash when SinguReplaceLinks is off. 2019-12-31 05:27:06 -05:00
Liru Færs
3fec94bb94 Clean up spell check entries properly, yikes.
Thanks for pointing this out, Torric!
2019-12-28 05:54:11 -05:00
Liru Færs
09926d12bb Fix compile, again, oops. 2019-12-28 04:10:21 -05:00
Liru Færs
19bcdae6ac LineEditor: Automatically hide spell check separator when it's not in use
That's the line that likes to linger beneath the menu, looking dumb
so now it won't, yay!
2019-12-28 04:09:35 -05:00
Liru Færs
36025384f4 Space change, remove excess check 2019-12-28 02:22:30 -05:00
Liru Færs
4bdbb89e6f TODONE: create accessor methods for mItems
Adds LLMenuGL::end, LLMenuGL::getItems
Changes LLMenuGL::find to a const function returning a const_iterator
2019-12-28 01:43:01 -05:00
Liru Færs
e94314dc95 LLMenuGL::getItemCount should be const and return size_type
Also put it in the header.
2019-12-28 01:21:33 -05:00
Liru Færs
5dd68a4055 Actually make use of the item_list_t typedef 2019-12-28 00:31:45 -05:00
Liru Færs
fff4e9b4b8 Add optional name parameter to addSeparator 2019-12-28 00:23:46 -05:00
Liru Færs
8a6f5b49a3 Merge branch 'master' of https://github.com/RouterGray/SingularityViewer 2019-12-27 20:19:49 -05:00
Router Gray
c8290b913e [CMake] Change remaining WORD_SIZE references to ADDDRESS_SIZE. 2019-12-27 06:16:59 -06:00
Liru Færs
e6e6d811c6 Updating crashpad 2019-12-25 21:33:51 -05:00
Router Gray
cdc35b3c32 [CMake] Remove add_dependency entries for items listed in target_link_libraries. Superfluous. (Alchemy sync)
Fixes Linux build errors.
2019-12-25 09:08:56 -06:00
Router Gray
c68e00730e [CMake Linux] Only include pthread and rt in target_link_libraries for ld.gold support (Alchemy sync)
Fixes CMake warnings on Linux
2019-12-25 09:08:48 -06:00
Router Gray
0496374328 [CMake] Use POSITION_INDEPENDENT_CODE property instead of manually setting -fPIC (Alchemy sync) 2019-12-25 09:08:40 -06:00
48 changed files with 354 additions and 389 deletions

View File

@@ -410,11 +410,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>849f515d4d77162c15614ebff8599c13</string>
<string>4614b29cc98021cf1770a8290171602b</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-365c520b.6-windows-6.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-ce32d093.7-windows-7.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -424,18 +424,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>7ea820b6a2cfa172f47d673c07dfa62c</string>
<string>d801461b7a6a40fffab828aa1e01e3e6</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-365c520b.6-windows64-6.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-ce32d093.7-windows64-7.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>365c520b.6</string>
<string>ce32d093.7</string>
</map>
<key>curl</key>
<map>
@@ -2771,7 +2771,7 @@
<key>options</key>
<array>
<string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
<string>-DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
</array>
@@ -2792,7 +2792,7 @@
<key>options</key>
<array>
<string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
<string>-DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
</array>
@@ -2943,7 +2943,7 @@
<array>
<string>-G</string>
<string>Ninja</string>
<string>-DWORD_SIZE:STRING=64</string>
<string>-DADDRESS_SIZE:STRING=64</string>
</array>
</map>
<key>default</key>
@@ -2968,7 +2968,7 @@
<array>
<string>-G</string>
<string>Ninja</string>
<string>-DWORD_SIZE:STRING=64</string>
<string>-DADDRESS_SIZE:STRING=64</string>
</array>
</map>
<key>name</key>
@@ -3068,7 +3068,7 @@
</map>
</map>
<key>name</key>
<string>windows64</string>
<string>windows</string>
</map>
</map>
<key>version_file</key>

View File

@@ -39,9 +39,9 @@ if (WINDOWS)
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
CACHE STRING "C compiler release options" FORCE)
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
if (FULL_DEBUG_SYMS OR USE_CRASHPAD)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FULL")
@@ -103,9 +103,9 @@ if (WINDOWS)
)
endif (USE_LTO)
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
add_compile_options(/arch:SSE2)
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
if (NOT DISABLE_FATAL_WARNINGS)
add_definitions(/WX)
@@ -292,13 +292,13 @@ if (LINUX OR DARWIN)
set(CMAKE_C_FLAGS "${UNIX_WARNINGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${UNIX_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
elseif (WORD_SIZE EQUAL 64)
elseif (ADDRESS_SIZE EQUAL 64)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
endif (LINUX OR DARWIN)

View File

@@ -6,17 +6,17 @@ SET(DEBUG_PKG_CONFIG "YES")
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
# Guess at architecture-specific system library paths.
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
else (WORD_SIZE EQUAL 32)
else (ADDRESS_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/x86_64-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
# Use DPKG architecture, if available.
IF (${DPKG_ARCH})

View File

@@ -2,16 +2,16 @@
include(Prebuilt)
if(WORD_SIZE EQUAL 64)
if(ADDRESS_SIZE EQUAL 64)
set(DISABLE_TCMALLOC TRUE)
endif(WORD_SIZE EQUAL 64)
endif(ADDRESS_SIZE EQUAL 64)
if (STANDALONE)
include(FindGooglePerfTools)
else (STANDALONE)
if (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
if (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64)
use_prebuilt_binary(gperftools)
endif (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
endif (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64)
if (WINDOWS AND NOT DISABLE_TCMALLOC)
set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib)
set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"")

View File

@@ -10,7 +10,6 @@ if (DARWIN)
find_library(CORESERVICES_LIBRARY CoreServices)
endif (DARWIN)
set(LLCOMMON_INCLUDE_DIRS
${LIBS_OPEN_DIR}/cwdebug
${LIBS_OPEN_DIR}/llcommon
@@ -19,14 +18,7 @@ set(LLCOMMON_INCLUDE_DIRS
${Boost_INCLUDE_DIRS}
)
if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llcommon uses.
# llcommon uses `clock_gettime' which is provided by librt on linux.
set(LLCOMMON_LIBRARIES llcommon rt)
else (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
endif (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
if(LLCOMMON_LINK_SHARED)

View File

@@ -5,10 +5,4 @@ set(LLPLUGIN_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llplugin
)
if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llplugin uses.
set(LLPLUGIN_LIBRARIES llplugin pthread)
else (LINUX)
set(LLPLUGIN_LIBRARIES llplugin)
endif (LINUX)
set(LLPLUGIN_LIBRARIES llplugin)

View File

@@ -5,11 +5,11 @@ include(Variables)
if (USE_NVAPI)
if (WINDOWS)
use_prebuilt_binary(nvapi)
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
set(NVAPI_LIBRARY nvapi)
elseif (WORD_SIZE EQUAL 64)
elseif (ADDRESS_SIZE EQUAL 64)
set(NVAPI_LIBRARY nvapi64)
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
else (WINDOWS)
set(NVAPI_LIBRARY "")
endif (WINDOWS)

View File

@@ -119,7 +119,6 @@ endif (NOT CMAKE_BUILD_TYPE)
# If someone has specified an address size, use that to determine the
# architecture. Otherwise, let the architecture specify the address size.
set(ADDRESS_SIZE ${WORD_SIZE})
if (ADDRESS_SIZE EQUAL 32)
#message(STATUS "ADDRESS_SIZE is 32")
set(ARCH i686)

View File

@@ -269,12 +269,6 @@ list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES})
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
if(NOT WORD_SIZE EQUAL 32)
if(NOT WINDOWS)
add_definitions(-fPIC)
endif(NOT WINDOWS)
endif(NOT WORD_SIZE EQUAL 32)
if(LLCOMMON_LINK_SHARED)
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
if(WINDOWS)
@@ -286,6 +280,8 @@ else(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES})
endif(LLCOMMON_LINK_SHARED)
set_target_properties(llcommon PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(
llcommon
PUBLIC
@@ -304,6 +300,7 @@ target_link_libraries(
${Boost_SYSTEM_LIBRARY}
${CORESERVICES_LIBRARY}
${URIPARSER_LIBRARY}
${RT_LIBRARY}
)
if (DARWIN)

View File

@@ -227,7 +227,8 @@ target_link_libraries(
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${XMLRPCEPI_LIBRARIES}
)
${PTHREAD_LIBRARY}
)
# tests
if (LL_TESTS)

View File

@@ -7,6 +7,7 @@ include(LLCommon)
include(LLMath)
include(LLMessage)
include(LLRender)
include(Boost)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -46,14 +47,6 @@ set(llplugin_HEADER_FILES
set_source_files_properties(${llplugin_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES})
@@ -67,6 +60,8 @@ else()
)
endif()
set_target_properties(llplugin PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_subdirectory(slplugin)
# # Add tests

View File

@@ -1,7 +1,6 @@
project(SLPlugin)
include(00-Common)
include(Linking)
include(LLCommon)
include(LLPlugin)
include(Linking)
@@ -69,12 +68,7 @@ target_link_libraries(SLPlugin
${LLCOMMON_LIBRARIES}
${APRUTIL_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES}
)
add_dependencies(SLPlugin
${LLPLUGIN_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLCOMMON_LIBRARIES}
${PTHREAD_LIBRARY}
)
if (DARWIN)

View File

@@ -181,7 +181,6 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
// make the popup menu available
LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
menu->addSeparator();
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
@@ -3006,54 +3005,47 @@ void LLLineEditor::showContextMenu(S32 x, S32 y)
{
gEditMenuHandler = this;
LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get();
if (menu)
if(menu->isOpen())
{
if(menu->isOpen())
{
menu->setVisible(FALSE);
}
// spell_check="true" in xui
if (!mReadOnly && mSpellCheckable)
{
// search for word matches
S32 wordStart = 0;
S32 wordLen = 0;
S32 pos = calculateCursorFromMouse(x);
if (getWordBoundriesAt(pos, &wordStart, &wordLen))
{
const auto selectedWord = wstring_to_utf8str(getWText().substr(wordStart, wordLen));
if (!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
for (const auto& word : glggHunSpell->getSuggestionList(selectedWord))
{
menu->addChild(new LLMenuItemCallGL(word, spell_correct, nullptr, this));
}
menu->addChild(new LLMenuItemCallGL("Add Word", spell_add, nullptr, this));
}
}
const std::string showstr("Show Misspellings"), hidestr("Hide Misspellings");
bool show = !glggHunSpell->getSpellCheckHighlight();
auto word = show ? showstr : hidestr;
if (!menu->hasChild(word))
{
menu->addChild(new LLMenuItemCallGL(word, spell_show, nullptr, show ? &show : nullptr));
if (auto child = menu->getChild<LLView>(show ? hidestr : showstr, false, false))
menu->removeChild(child);
}
}
mLastContextMenuX = x;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
menu->setVisible(FALSE);
}
// spell_check="true" in xui
if (!mReadOnly && mSpellCheckable)
{
constexpr auto spell_sep = "Spell Check Sep";
// Remove everything after the separator if we added it, because menus don't autodie yet.
menu->erase(menu->find(menu->findChild<LLMenuItemGL>(spell_sep)), menu->end());
menu->addSeparator(spell_sep);
// search for word matches
S32 wordStart = 0;
S32 wordLen = 0;
S32 pos = calculateCursorFromMouse(x);
if (getWordBoundriesAt(pos, &wordStart, &wordLen))
{
const auto selectedWord = wstring_to_utf8str(getWText().substr(wordStart, wordLen));
if (!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
for (const auto& word : glggHunSpell->getSuggestionList(selectedWord))
{
menu->addChild(new LLMenuItemCallGL(word, spell_correct, nullptr, this));
}
menu->addChild(new LLMenuItemCallGL("Add Word", spell_add, nullptr, this));
}
}
bool show = !glggHunSpell->getSpellCheckHighlight();
menu->addChild(new LLMenuItemCallGL(show ? "Show Misspellings" : "Hide Misspellings", spell_show, nullptr, show ? menu : nullptr));
}
mLastContextMenuX = x;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
}
}

View File

@@ -692,16 +692,17 @@ BOOL LLMenuItemSeparatorGL::handleHover(S32 x, S32 y, MASK mask)
// This class represents a vertical separator.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLMenuItemVerticalSeparatorGL
class LLMenuItemVerticalSeparatorGL final
: public LLMenuItemSeparatorGL
{
public:
LLMenuItemVerticalSeparatorGL( void );
LLMenuItemVerticalSeparatorGL(const std::string& name = LLStringUtil::null);
BOOL handleMouseDown(S32 x, S32 y, MASK mask) override { return FALSE; }
};
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL( void )
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL(const std::string& name)
: LLMenuItemSeparatorGL(name)
{
setLabel( VERTICAL_SEPARATOR_LABEL );
}
@@ -826,15 +827,15 @@ U32 LLMenuItemTearOffGL::getNominalHeight( void ) const
// This class represents a blank, non-functioning item.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLMenuItemBlankGL : public LLMenuItemGL
class LLMenuItemBlankGL final : public LLMenuItemGL
{
public:
LLMenuItemBlankGL( void ) : LLMenuItemGL( LLStringUtil::null, LLStringUtil::null )
LLMenuItemBlankGL(const std::string& name = LLStringUtil::null) : LLMenuItemGL(name, LLStringUtil::null)
{
setEnabled(FALSE);
}
virtual void onCommit( void ) {}
virtual void draw( void ) {}
void onCommit() override {}
void draw() override {}
};
@@ -3166,12 +3167,7 @@ void LLMenuGL::erase( S32 begin, S32 end, bool arrange/* = true*/)
item_list_t::iterator end_position = mItems.begin();
std::advance(end_position, end);
for (item_list_t::iterator position_iter = start_position; position_iter != end_position; position_iter++)
{
LLUICtrl::removeChild(*position_iter);
}
mItems.erase(start_position, end_position);
erase(start_position, end_position);
if (arrange)
{
@@ -3193,7 +3189,7 @@ void LLMenuGL::insert(S32 position, LLView* ctrl, bool arrange /*= true*/)
std::advance(position_iter, position);
insert(position_iter, item, arrange);
}
void LLMenuGL::insert(item_list_t::iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/)
void LLMenuGL::insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/)
{
mItems.insert(position_iter, item);
LLUICtrl::addChild(item);
@@ -3243,9 +3239,9 @@ BOOL LLMenuGL::append( LLMenuItemGL* item )
}
// add a separator to this menu
BOOL LLMenuGL::addSeparator()
BOOL LLMenuGL::addSeparator(const std::string& name)
{
LLMenuItemGL* separator = new LLMenuItemSeparatorGL();
LLMenuItemGL* separator = new LLMenuItemSeparatorGL(name);
return addChild(separator);
}
@@ -3332,11 +3328,6 @@ void LLMenuGL::setTornOff(BOOL torn_off)
mTornOff = torn_off;
}
U32 LLMenuGL::getItemCount()
{
return mItems.size();
}
LLMenuItemGL* LLMenuGL::getItem(S32 number)
{
if (number >= 0 && number < (S32)mItems.size())
@@ -4197,10 +4188,10 @@ S32 LLMenuBarGL::getRightmostMenuEdge()
}
// add a vertical separator to this menu
BOOL LLMenuBarGL::addSeparator()
BOOL LLMenuBarGL::addSeparator(const std::string& name)
{
LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL();
return append( separator );
LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL(name);
return append(separator);
}
// add a menu - this will create a drop down menu.
@@ -5361,9 +5352,9 @@ BOOL LLPieMenu::append(LLMenuItemGL *item)
}
// virtual
BOOL LLPieMenu::addSeparator()
BOOL LLPieMenu::addSeparator(const std::string& name)
{
return append( new LLMenuItemBlankGL() );
return append(new LLMenuItemBlankGL(name));
}
// virtual

View File

@@ -490,7 +490,7 @@ public:
void setCanTearOff(BOOL tear_off);
// add a separator to this menu
virtual BOOL addSeparator();
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null);
// for branching menu items, bring sub menus up to root level of menu hierarchy
virtual void updateParent( LLView* parentp );
@@ -527,16 +527,31 @@ public:
// erase group of items from menu
void erase(S32 begin, S32 end, bool arrange = true);
typedef std::list<LLMenuItemGL*> item_list_t;
inline item_list_t::iterator erase(item_list_t::const_iterator first, item_list_t::const_iterator last)
{
for (auto it = first; it != last; ++it)
LLUICtrl::removeChild(*it);
return mItems.erase(first, last);
}
// add new item at position
void insert(S32 begin, LLView* ctrl, bool arrange = true);
void insert(std::list<LLMenuItemGL*>::iterator position_iter, LLMenuItemGL* item, bool arrange = true);
void insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange = true);
// find an item's position
std::list<LLMenuItemGL*>::iterator find(LLMenuItemGL* item) { return std::find(mItems.begin(), mItems.end(), item); }
item_list_t::const_iterator find(LLMenuItemGL* item) const { return std::find(mItems.begin(), mItems.end(), item); }
// end of items, for use with other members that return an iterator
item_list_t::const_iterator end() const { return mItems.cend(); }
// get list of items
const item_list_t& getItems() const { return mItems; }
// number of menu items
item_list_t::size_type getItemCount() const { return mItems.size(); }
void setItemLastSelected(LLMenuItemGL* item); // must be in menu
U32 getItemCount(); // number of menu items
LLMenuItemGL* getItem(S32 number); // 0 = first item
LLMenuItemGL* getHighlightedItem();
@@ -591,9 +606,8 @@ public:
virtual BOOL appendMenu( LLMenuGL* menu );
protected:
// TODO: create accessor methods for these?
typedef std::list< LLMenuItemGL* > item_list_t;
item_list_t mItems;
// TODO: create accessor methods for these?
LLMenuItemGL*mFirstVisibleItem;
LLMenuItemGL *mArrowUpItem, *mArrowDownItem;
@@ -764,7 +778,7 @@ public:
private:
virtual BOOL append(LLMenuItemGL* item);
public:
virtual BOOL addSeparator();
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null) override final;
virtual void arrange( void );
@@ -844,7 +858,7 @@ public:
/*virtual*/ BOOL jumpKeysActive();
// add a vertical separator to this menu
virtual BOOL addSeparator();
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null) override final;
// LLView Functionality
virtual BOOL handleHover( S32 x, S32 y, MASK mask );

View File

@@ -4228,8 +4228,9 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
if (always_underline) link_style->mUnderline = true;
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
};
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : LLUrlLabelCallback();
while (!text.empty() && LLUrlRegistry::instance().findUrl(text, match, cb))
const auto&& cb = boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3);
auto& urlr = LLUrlRegistry::instance();
while (!text.empty() && (force_replace_links ? urlr.findUrl(text, match, cb) : urlr.findUrl(text, match)))
{
start = match.getStart();
end = match.getEnd()+1;

View File

@@ -1532,18 +1532,18 @@ if (WINDOWS)
endif (ADDRESS_SIZE EQUAL 64)
if (USE_FMODSTUDIO)
if (WORD_SIZE EQUAL 64)
if (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/Release/fmod64.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod64.dll
${SHARED_LIB_STAGING_DIR}/Debug/fmodL64.dll
)
else (WORD_SIZE EQUAL 64)
else (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/Release/fmod.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll
)
endif (WORD_SIZE EQUAL 64)
endif (ADDRESS_SIZE EQUAL 64)
endif (USE_FMODSTUDIO)
if(MSVC_IDE)

View File

@@ -381,6 +381,7 @@ LLAgent::LLAgent() :
mAgentAccess(new LLAgentAccess(gSavedSettings)),
mGodLevelChangeSignal(),
mIsCrossingRegion(false),
mCanEditParcel(false),
mTeleportSourceSLURL(new LLSLURL),
mTeleportRequest(),
@@ -4431,6 +4432,7 @@ void LLAgent::setTeleportState(ETeleportState state)
{
case TELEPORT_NONE:
mbTeleportKeepsLookAt = false;
mIsCrossingRegion = false; // Attachments getting lost on TP; finished TP
break;
case TELEPORT_MOVING:

View File

@@ -739,6 +739,13 @@ private:
** **
*******************************************************************************/
// Attachments getting lost on TP
public:
void setIsCrossingRegion(bool is_crossing) { mIsCrossingRegion = is_crossing; }
bool isCrossingRegion() const { return mIsCrossingRegion; }
private:
bool mIsCrossingRegion;
// Build
public:
bool canEditParcel() const { return mCanEditParcel; }

View File

@@ -2841,6 +2841,12 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
{
if(!category) return;
// Attachments getting lost on TP:
// We'll be sending the outfit change request to our current region,
// so we'll learn them if they've been sending bad kills.
// We don't take kindly to that sorta behaviour round these parts.
gAgent.setIsCrossingRegion(false);
selfClearPhases();
selfStartPhase("wear_inventory_category");

View File

@@ -47,8 +47,8 @@ LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewer
LLVOAvatar(id, pcode, regionp),
mPlaying(false),
mGlobalScale(1.0f),
mRootVolp(NULL),
mMarkedForDeath(false),
mRootVolp(NULL),
mScaleConstraintFixup(1.0),
mRegionChanged(false)
{
@@ -60,6 +60,8 @@ LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewer
// virtual
LLControlAvatar::~LLControlAvatar()
{
// Should already have been unlinked before destruction
llassert(!mRootVolp);
}
// virtual
@@ -82,18 +84,12 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
{
F32 max_legal_offset = MAX_LEGAL_OFFSET;
if (gSavedSettings.getControl("AnimatedObjectsMaxLegalOffset"))
{
max_legal_offset = gSavedSettings.getF32("AnimatedObjectsMaxLegalOffset");
}
max_legal_offset = llmax(max_legal_offset,0.f);
static LLCachedControl<F32> animated_object_max_legal_offset(gSavedSettings, "AnimatedObjectsMaxLegalOffset");
max_legal_offset = llmax(animated_object_max_legal_offset(),0.f);
F32 max_legal_size = MAX_LEGAL_SIZE;
if (gSavedSettings.getControl("AnimatedObjectsMaxLegalSize"))
{
max_legal_size = gSavedSettings.getF32("AnimatedObjectsMaxLegalSize");
}
max_legal_size = llmax(max_legal_size, 1.f);
static LLCachedControl<F32> animated_object_max_legal_size(gSavedSettings, "AnimatedObjectsMaxLegalSize");
max_legal_size = llmax(animated_object_max_legal_size(), 1.f);
new_pos_fixup = LLVector3();
new_scale_fixup = 1.0f;
@@ -113,7 +109,7 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
unshift_extents[0] = extents[0] - mPositionConstraintFixup;
unshift_extents[1] = extents[1] - mPositionConstraintFixup;
LLVector3 box_dims = extents[1]-extents[0];
//F32 box_size = llmax(box_dims[0],box_dims[1],box_dims[2]);
F32 box_size = llmax(box_dims[0],box_dims[1],box_dims[2]);
if (!mRootVolp->isAttachment())
{
@@ -124,23 +120,23 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
F32 target_dist = (offset_dist - max_legal_offset);
new_pos_fixup = (target_dist/offset_dist)*pos_box_offset;
}
if (new_pos_fixup != mPositionConstraintFixup)
{
LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup "
<< new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL;
LL_DEBUGS("ConstraintFix") << "vol_pos " << vol_pos << LL_ENDL;
LL_DEBUGS("ConstraintFix") << "extents " << extents[0] << " " << extents[1] << LL_ENDL;
LL_DEBUGS("ConstraintFix") << "unshift_extents " << unshift_extents[0] << " " << unshift_extents[1] << LL_ENDL;
}
//if (new_pos_fixup != mPositionConstraintFixup)
//{
// LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup "
// << new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL;
// LL_DEBUGS("ConstraintFix") << "vol_pos " << vol_pos << LL_ENDL;
// LL_DEBUGS("ConstraintFix") << "extents " << extents[0] << " " << extents[1] << LL_ENDL;
// LL_DEBUGS("ConstraintFix") << "unshift_extents " << unshift_extents[0] << " " << unshift_extents[1] << LL_ENDL;
//
//}
}
/*if (box_size/mScaleConstraintFixup > max_legal_size)
if (box_size/mScaleConstraintFixup > max_legal_size)
{
new_scale_fixup = mScaleConstraintFixup*max_legal_size/box_size;
LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup "
<< mScaleConstraintFixup << " max legal " << max_legal_size
<< " -> new scale " << new_scale_fixup << LL_ENDL;
}*/
//LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup "
// << mScaleConstraintFixup << " max legal " << max_legal_size
// << " -> new scale " << new_scale_fixup << LL_ENDL;
}
}
}
@@ -163,6 +159,8 @@ void LLControlAvatar::matchVolumeTransform()
mPositionConstraintFixup = new_pos_fixup;
mScaleConstraintFixup = new_scale_fixup;
static LLCachedControl<F32> global_scale(gSavedSettings, "AnimatedObjectsGlobalScale", 1.f);
if (mRootVolp->isAttachment())
{
LLVOAvatar *attached_av = mRootVolp->getAvatarAncestor();
@@ -174,13 +172,12 @@ void LLControlAvatar::matchVolumeTransform()
LLVector3 joint_pos = attach->getWorldPosition();
LLQuaternion joint_rot = attach->getWorldRotation();
LLVector3 obj_pos = mRootVolp->mDrawable->getPosition();
LLQuaternion obj_rot = mRootVolp->mDrawable->getRotation();
const LLQuaternion& obj_rot = mRootVolp->mDrawable->getRotation();
obj_pos.rotVec(joint_rot);
mRoot->setWorldPosition(obj_pos + joint_pos);
mRoot->setWorldRotation(obj_rot * joint_rot);
setRotation(mRoot->getRotation());
F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale");
setGlobalScale(global_scale * mScaleConstraintFixup);
}
else
@@ -200,17 +197,7 @@ void LLControlAvatar::matchVolumeTransform()
// complexity info and such line up better. Should defer
// this until avatars also get fixed.
LLQuaternion obj_rot;
if (mRootVolp->mDrawable)
{
obj_rot = mRootVolp->mDrawable->getRotation();
}
else
{
obj_rot = mRootVolp->getRotation();
}
LLMatrix3 bind_mat;
const LLQuaternion& obj_rot = mRootVolp->mDrawable ? mRootVolp->mDrawable->getRotation() : mRootVolp->getRotation();
LLQuaternion bind_rot;
#define MATCH_BIND_SHAPE
@@ -219,7 +206,7 @@ void LLControlAvatar::matchVolumeTransform()
const LLMeshSkinInfo* skin_info = mRootVolp->getSkinInfo();
if (skin_info)
{
LL_DEBUGS("BindShape") << getFullname() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL;
//LL_DEBUGS("BindShape") << getFullname() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL;
bind_rot = LLSkinningUtil::getUnscaledQuaternion(skin_info->mBindShapeMatrix);
}
#endif
@@ -228,7 +215,6 @@ void LLControlAvatar::matchVolumeTransform()
setPositionAgent(vol_pos);
mRoot->setPosition(vol_pos + mPositionConstraintFixup);
F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale");
setGlobalScale(global_scale * mScaleConstraintFixup);
}
}
@@ -236,7 +222,7 @@ void LLControlAvatar::matchVolumeTransform()
void LLControlAvatar::setGlobalScale(F32 scale)
{
if (scale <= 0.0)
if (scale <= 0.0f)
{
LL_WARNS() << "invalid global scale " << scale << LL_ENDL;
return;
@@ -255,10 +241,8 @@ void LLControlAvatar::recursiveScaleJoint(LLJoint* joint, F32 factor)
{
joint->setScale(factor * joint->getScale());
for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin();
iter != joint->mChildren.end(); ++iter)
for (auto child : joint->mChildren)
{
LLJoint* child = *iter;
recursiveScaleJoint(child, factor);
}
}
@@ -278,10 +262,9 @@ void LLControlAvatar::updateVolumeGeom()
mRootVolp->mDrawable->setState(LLDrawable::USE_BACKLIGHT);
LLViewerObject::const_child_list_t& child_list = mRootVolp->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
for (const auto& iter : child_list)
{
LLViewerObject* childp = *iter;
LLViewerObject* childp = iter;
if (childp && childp->mDrawable.notNull())
{
childp->mDrawable->setState(LLDrawable::USE_BACKLIGHT);
@@ -339,6 +322,7 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
void LLControlAvatar::markForDeath()
{
mMarkedForDeath = true;
mRootVolp = NULL;
}
void LLControlAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
@@ -362,7 +346,8 @@ BOOL LLControlAvatar::updateCharacter(LLAgent &agent)
//virtual
void LLControlAvatar::updateDebugText()
{
/*if (gSavedSettings.getBOOL("DebugAnimatedObjects"))
/*static LLCachedControl<bool> debug_animated_objects(gSavedSettings, "DebugAnimatedObjects");
if (debug_animated_objects)
{
S32 total_linkset_count = 0;
if (mRootVolp)
@@ -385,10 +370,8 @@ void LLControlAvatar::updateDebugText()
S32 cam_dist_count = 0;
F32 lod_radius = mRootVolp->mLODRadius;
for (std::vector<LLVOVolume*>::iterator it = volumes.begin();
it != volumes.end(); ++it)
for (auto volp : volumes)
{
LLVOVolume *volp = *it;
S32 verts = 0;
total_tris += volp->getTriangleCount(&verts);
total_verts += verts;
@@ -491,11 +474,10 @@ void LLControlAvatar::getAnimatedVolumes(std::vector<LLVOVolume*>& volumes)
volumes.push_back(mRootVolp);
LLViewerObject::const_child_list_t& child_list = mRootVolp->getChildren();
for (LLViewerObject::const_child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
for (const auto& iter : child_list)
{
LLViewerObject* childp = *iter;
LLVOVolume *child_volp = dynamic_cast<LLVOVolume*>(childp);
LLViewerObject* childp = iter;
LLVOVolume *child_volp = childp ? childp->asVolume() : nullptr;
if (child_volp && child_volp->isAnimatedObject())
{
volumes.push_back(child_volp);
@@ -519,16 +501,16 @@ void LLControlAvatar::updateAnimations()
// Rebuild mSignaledAnimations from the associated volumes.
std::map<LLUUID, S32> anims;
for (std::vector<LLVOVolume*>::iterator vol_it = volumes.begin(); vol_it != volumes.end(); ++vol_it)
for (auto vol_it = volumes.begin(); vol_it != volumes.end(); ++vol_it)
{
LLVOVolume *volp = *vol_it;
//LL_INFOS("AnimatedObjects") << "updating anim for vol " << volp->getID() << " root " << mRootVolp->getID() << LL_ENDL;
signaled_animation_map_t& signaled_animations = LLObjectSignaledAnimationMap::instance().getMap()[volp->getID()];
for (std::map<LLUUID,S32>::iterator anim_it = signaled_animations.begin();
for (auto anim_it = signaled_animations.begin();
anim_it != signaled_animations.end();
++anim_it)
{
std::map<LLUUID,S32>::iterator found_anim_it = anims.find(anim_it->first);
auto found_anim_it = anims.find(anim_it->first);
if (found_anim_it != anims.end())
{
// Animation already present, use the larger sequence id
@@ -539,7 +521,9 @@ void LLControlAvatar::updateAnimations()
// Animation not already present, use this sequence id.
anims[anim_it->first] = anim_it->second;
}
#if LL_DEBUG
LL_DEBUGS("AnimatedObjectsNotify") << "found anim for vol " << volp->getID() << " anim " << anim_it->first << " root " << mRootVolp->getID() << LL_ENDL;
#endif
}
}
if (!mPlaying)
@@ -567,24 +551,45 @@ LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLV
LLVector4a* normal,
LLVector4a* tangent)
{
if (!mRootVolp)
{
return NULL;
}
LLViewerObject* hit = NULL;
if (lineSegmentBoundingBox(start, end))
{
LLVector4a local_end = end;
LLVector4a local_intersection;
if (mRootVolp &&
mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
if (mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
{
local_end = local_intersection;
if (intersection)
{
*intersection = local_intersection;
}
hit = mRootVolp;
}
else
{
std::vector<LLVOVolume*> volumes;
getAnimatedVolumes(volumes);
for (auto volp : volumes)
{
if (mRootVolp != volp && volp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
{
local_end = local_intersection;
if (intersection)
{
*intersection = local_intersection;
}
hit = volp;
break;
}
}
}
}
return hit;
@@ -618,7 +623,7 @@ bool LLControlAvatar::shouldRenderRigged() const
}
// virtual
BOOL LLControlAvatar::isImpostor()
BOOL LLControlAvatar::isImpostor() const
{
if (mRootVolp && mRootVolp->isAttachment())
{
@@ -638,8 +643,11 @@ void LLControlAvatar::onRegionChanged()
std::vector<LLCharacter*>::iterator it = LLCharacter::sInstances.begin();
for ( ; it != LLCharacter::sInstances.end(); ++it)
{
LLControlAvatar* cav = dynamic_cast<LLControlAvatar*>(*it);
if (!cav) continue;
cav->mRegionChanged = true;
auto avatar = static_cast<LLVOAvatar*>(*it);
if (!avatar->isDead() && avatar->isControlAvatar())
{
LLControlAvatar* cav = static_cast<LLControlAvatar*>(avatar);
cav->mRegionChanged = true;
}
}
}

View File

@@ -30,16 +30,16 @@
#include "llvoavatar.h"
#include "llvovolume.h"
class LLControlAvatar:
class LLControlAvatar final:
public LLVOAvatar
{
LOG_CLASS(LLControlAvatar);
public:
LLControlAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual void initInstance(); // Called after construction to initialize the class.
void initInstance() override; // Called after construction to initialize the class.
virtual ~LLControlAvatar();
virtual LLControlAvatar* asControlAvatar() { return this; }
LLControlAvatar* asControlAvatar() override { return this; }
void getNewConstraintFixups(LLVector3& new_pos_constraint, F32& new_scale_constraint) const;
void matchVolumeTransform();
@@ -53,13 +53,13 @@ public:
// markDead() inside other graphics pipeline operations.
void markForDeath();
virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
virtual BOOL updateCharacter(LLAgent &agent);
void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) override;
BOOL updateCharacter(LLAgent &agent) override;
void getAnimatedVolumes(std::vector<LLVOVolume*>& volumes);
void updateAnimations();
virtual LLViewerObject* lineSegmentIntersectRiggedAttachments(
LLViewerObject* lineSegmentIntersectRiggedAttachments(
const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
@@ -68,15 +68,15 @@ public:
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
LLVector4a* normal = NULL, // return the surface normal at the intersection point
LLVector4a* tangent = NULL); // return the surface tangent at the intersection point
LLVector4a* tangent = NULL) override; // return the surface tangent at the intersection point
virtual void updateDebugText();
void updateDebugText() override;
virtual std::string getFullname() const;
std::string getFullname() const override;
virtual bool shouldRenderRigged() const;
bool shouldRenderRigged() const override;
virtual BOOL isImpostor();
BOOL isImpostor() const override;
bool mPlaying;
@@ -101,7 +101,7 @@ typedef std::map<LLUUID, S32> signaled_animation_map_t;
typedef std::map<LLUUID, signaled_animation_map_t> object_signaled_animation_map_t;
// Stores information about previously requested animations, by object id.
class LLObjectSignaledAnimationMap: public LLSingleton<LLObjectSignaledAnimationMap>
class LLObjectSignaledAnimationMap final : public LLSingleton<LLObjectSignaledAnimationMap>
{
public:
LLObjectSignaledAnimationMap() {}

View File

@@ -600,12 +600,12 @@ void LLFloaterTools::refresh()
S32 index = 1;
for (const auto& child : children)
{
++index;
if (child->isSelected())
{
LLResMgr::getInstance()->getIntegerString(value_string, index);
break;
}
++index;
}
}
}
@@ -1383,8 +1383,8 @@ void LLFloaterTools::getMediaState()
for ( ; iter != end; ++iter)
{
LLSelectNode* node = *iter;
LLVOVolume* object = dynamic_cast<LLVOVolume*>(node->getObject());
if (NULL != object)
LLVOVolume* object = node ? node->getObject()->asVolume() : nullptr;
if (nullptr != object)
{
if (!object->permModify())
{

View File

@@ -266,8 +266,8 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect)
location_combo->setFocusLostCallback( boost::bind(&LLPanelLogin::onLocationSLURL, this) );
LLComboBox* server_choice_combo = getChild<LLComboBox>("grids_combo");
server_choice_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectGrid, _1));
server_choice_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onSelectGrid, server_choice_combo));
server_choice_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectGrid, this, _1));
server_choice_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onSelectGrid, this, server_choice_combo));
// Load all of the grids, sorted, and then add a bar and the current grid at the top
updateGridCombo();
@@ -1111,7 +1111,7 @@ void LLPanelLogin::onSelectGrid(LLUICtrl *ctrl)
}
gHippoGridManager->setCurrentGrid(grid);
ctrl->setValue(grid);
sInstance->addFavoritesToStartLocation();
addFavoritesToStartLocation();
/*
* Determine whether or not the value in the start_location_combo makes sense
@@ -1123,7 +1123,7 @@ void LLPanelLogin::onSelectGrid(LLUICtrl *ctrl)
* https://grid.example.com/region/Party%20Town/20/30/5 specify a particular
* grid; in those cases we want to clear the location.
*/
auto location_combo = sInstance->getChild<LLComboBox>("start_location_combo");
auto location_combo = getChild<LLComboBox>("start_location_combo");
S32 index = location_combo->getCurrentIndex();
switch (index)
{

View File

@@ -114,7 +114,7 @@ private:
static void onClickNewAccount();
static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response);
static void onClickGrids();
static void onSelectGrid(LLUICtrl *ctrl);
void onSelectGrid(LLUICtrl *ctrl);
static void onClickForgotPassword();
static void onPassKey();
static void onSelectLoginEntry(const LLSD& selected_entry);

View File

@@ -1712,7 +1712,7 @@ void LLPanelObjectInventory::updateInventory()
// We're still interested in this task's inventory.
uuid_set_t selected_items;
BOOL inventory_has_focus = FALSE;
if (mHaveInventory)
if (mHaveInventory && mFolders)
{
selected_items = mFolders->getSelectionList();
inventory_has_focus = gFocusMgr.childHasKeyboardFocus(mFolders);

View File

@@ -390,7 +390,8 @@ void LLPanelPermissions::refresh()
// Update last owner text field
getChildView("Last Owner:")->setEnabled(TRUE);
std::string owner_app_link;
static const auto none_str = LLTrans::getString("GroupNameNone");
std::string owner_app_link(none_str);
if (auto view = getChild<LLTextBox>("Creator Name"))
{
if (LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, owner_app_link))
@@ -405,6 +406,7 @@ void LLPanelPermissions::refresh()
view->setEnabled(true);
}
owner_app_link = none_str;
const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link);
if (auto view = getChild<LLTextBox>("Owner Name"))
{
@@ -422,6 +424,7 @@ void LLPanelPermissions::refresh()
if (auto view = getChild<LLTextBox>("Last Owner Name"))
{
owner_app_link = none_str;
if (LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, owner_app_link))
{
view->setValue(mLastOwnerID);

View File

@@ -320,7 +320,7 @@ void LLPanelPrimMediaControls::updateShape()
{
bool mini_controls = false;
LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
LLVOVolume *vol = dynamic_cast<LLVOVolume*>(objectp);
LLVOVolume *vol = objectp ? objectp->asVolume() : nullptr;
if (media_data && vol)
{
// Don't show the media controls if we do not have permissions

View File

@@ -1998,7 +1998,7 @@ void LLSelectMgr::selectionSetMedia(U8 media_type, const LLSD &media_data)
else {
// Add/update media
object->setTEMediaFlags(te, mMediaFlags);
LLVOVolume *vo = dynamic_cast<LLVOVolume*>(object);
LLVOVolume *vo = object->asVolume();
llassert(NULL != vo);
if (NULL != vo)
{
@@ -2024,7 +2024,7 @@ void LLSelectMgr::selectionSetMedia(U8 media_type, const LLSD &media_data)
if (object->permModify())
{
object->sendTEUpdate();
LLVOVolume *vo = dynamic_cast<LLVOVolume*>(object);
LLVOVolume *vo = object->asVolume();
llassert(NULL != vo);
// It's okay to skip this object if hasMedia() is false...
// the sendTEUpdate() above would remove all media data if it were
@@ -7434,7 +7434,7 @@ S32 LLObjectSelection::getSelectedObjectRenderCost()
++child_iter)
{
LLViewerObject* child_obj = *child_iter;
LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
LLVOVolume *child = child_obj ? child_obj->asVolume() : nullptr;
if (child)
{
cost += child->getRenderCost(textures);

View File

@@ -1787,7 +1787,7 @@ void renderComplexityDisplay(LLDrawable* drawablep)
return;
}
LLVOVolume *voVol = dynamic_cast<LLVOVolume*>(vobj);
LLVOVolume *voVol = vobj->asVolume();;
if (!voVol)
{

View File

@@ -8564,6 +8564,7 @@ void handle_rebake_textures(void*)
{
LLAppearanceMgr::instance().requestServerAppearanceUpdate();
}
gAgent.setIsCrossingRegion(false); // Attachments getting lost on TP
}
void toggle_visibility(void* user_data)
@@ -10009,7 +10010,7 @@ void parse_simulator_features()
LLMenuGL* menu = dynamic_cast<LLMenuGL*>(marker->getParent());
if (!menu) continue;
std::list<LLMenuItemGL*>::iterator it = menu->find(marker);
auto it = menu->find(marker);
for (LLSD::map_iterator j = i->second.beginMap(); j != i->second.endMap(); ++j)
{

View File

@@ -4904,6 +4904,8 @@ void process_crossed_region(LLMessageSystem* msg, void**)
}
LL_INFOS("Messaging") << "process_crossed_region()" << LL_ENDL;
gAgentAvatarp->resetRegionCrossingTimer();
gAgent.setIsCrossingRegion(false); // Attachments getting lost on TP, region crossing hook
U32 sim_ip;
msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip);
@@ -5300,10 +5302,23 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
LLViewerObject *objectp = gObjectList.findObject(id);
if (objectp)
{
if (different_region && gAgentAvatarp == objectp->getAvatar())
if (gAgentAvatarp == objectp->getAvatar())
{
LL_WARNS() << "Region other than our own killing our attachments!!" << LL_ENDL;
continue;
if (different_region)
{
LL_WARNS() << "Region other than our own killing our attachments!!" << LL_ENDL;
continue;
}
else if (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
{
LL_WARNS() << "Region killing our attachments during teleport!!" << LL_ENDL;
continue;
}
else if (gAgent.isCrossingRegion())
{
LL_WARNS() << "Region killing our attachments during region cross!!" << LL_ENDL;
continue;
}
}
// Display green bubble on kill
if ( gShowObjectUpdates )
@@ -5938,7 +5953,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
return;
}
LLVOVolume *volp = dynamic_cast<LLVOVolume*>(objp);
LLVOVolume *volp = objp->asVolume();
if (!volp)
{
LL_DEBUGS("AnimatedObjectsNotify") << "Received animation state for non-volume object " << uuid << LL_ENDL;
@@ -6804,7 +6819,6 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
std::string llsdRaw;
LLSD llsdBlock;
msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_ExtraParams, llsdRaw);
if (llsdRaw.length())
{
@@ -6851,6 +6865,11 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
return true;
}
}
else if (notificationID == "expired_region_handoff" || notificationID == "invalid_region_handoff") // borked region handoff
{
gAgent.setIsCrossingRegion(false); // Attachments getting lost on TP
}
else
// HACK -- handle callbacks for specific alerts.
if (notificationID == "HomePositionSet")
{

View File

@@ -1620,7 +1620,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
retval |= checkMediaURL(media_url);
//
// Unpack particle system data
// Unpack particle system data (legacy)
//
if (value & 0x8)
{
@@ -2188,23 +2188,22 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
mStatic = FALSE;
}
// BUG: This code leads to problems during group rotate and any scale operation.
// Small discepencies between the simulator and viewer representations cause the
// selection center to creep, leading to objects moving around the wrong center.
//
// Removing this, however, means that if someone else drags an object you have
// selected, your selection center and dialog boxes will be wrong. It also means
// that higher precision information on selected objects will be ignored.
//
// I believe the group rotation problem is fixed. JNC 1.21.2002
//
// BUG: This code leads to problems during group rotate and any scale operation.
// Small discepencies between the simulator and viewer representations cause the
// selection center to creep, leading to objects moving around the wrong center.
//
// Removing this, however, means that if someone else drags an object you have
// selected, your selection center and dialog boxes will be wrong. It also means
// that higher precision information on selected objects will be ignored.
//
// I believe the group rotation problem is fixed. JNC 1.21.2002
//
// Additionally, if any child is selected, need to update the dialogs and selection
// center.
BOOL needs_refresh = mUserSelected;
for (child_list_t::iterator iter = mChildList.begin();
iter != mChildList.end(); iter++)
for (auto& iter : mChildList)
{
LLViewerObject* child = *iter;
LLViewerObject* child = iter;
needs_refresh = needs_refresh || child->mUserSelected;
}
@@ -2952,10 +2951,9 @@ void LLViewerObject::updateControlAvatar()
{
bool any_rigged_mesh = root->isRiggedMesh();
LLViewerObject::const_child_list_t& child_list = root->getChildren();
for (LLViewerObject::const_child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
for (const auto& iter : child_list)
{
const LLViewerObject* child = *iter;
const LLViewerObject* child = iter;
any_rigged_mesh = any_rigged_mesh || child->isRiggedMesh();
}
should_have_control_avatar = is_animated_object && any_rigged_mesh;
@@ -3093,7 +3091,7 @@ void LLViewerObject::linkControlAvatar()
{
if (!getControlAvatar() && isRootEdit())
{
LLVOVolume *volp = dynamic_cast<LLVOVolume*>(this);
LLVOVolume *volp = asVolume();
if (!volp)
{
LL_WARNS() << "called with null or non-volume object" << LL_ENDL;
@@ -3136,6 +3134,7 @@ void LLViewerObject::unlinkControlAvatar()
if (mControlAvatar)
{
mControlAvatar->markForDeath();
mControlAvatar->mRootVolp = NULL;
mControlAvatar = NULL;
}
}
@@ -3269,7 +3268,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
LLInventoryObject::object_list_t::iterator end = object->mInventory->end();
std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs;
for (; it != end && pending_lst.size(); ++it)
for (; it != end && !pending_lst.empty(); ++it)
{
LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get());
if(item && item->getType() != LLAssetType::AT_CATEGORY)
@@ -3292,7 +3291,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
}
else
{
// This Occurs When to requests were made, and the first one
// This Occurs When two requests were made, and the first one
// has already handled it.
LL_DEBUGS() << "Problem loading task inventory. Return code: "
<< error_code << LL_ENDL;
@@ -3412,11 +3411,6 @@ void LLViewerObject::removeInventory(const LLUUID& item_id)
msg->sendReliable(mRegionp->getHost());
deleteInventoryItem(item_id);
++mInventorySerialNum;
// The viewer object should not refresh UI since this is a utility
// function. The UI functionality that called this method should
// refresh the views if necessary.
//gBuildView->refresh();
}
bool LLViewerObject::isTextureInInventory(LLViewerInventoryItem* item)
@@ -3531,7 +3525,7 @@ void LLViewerObject::getInventoryContents(LLInventoryObject::object_list_t& obje
LLInventoryObject* LLViewerObject::getInventoryRoot()
{
if (!mInventory || !mInventory->size())
if (!mInventory || mInventory->empty())
{
return NULL;
}
@@ -3587,8 +3581,8 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent)
return;
}
LLVector3 viewer_pos_agent = gAgentCamera.getCameraPositionAgent();
LLVector3 pos_agent = getRenderPosition();
const LLVector3& viewer_pos_agent = gAgentCamera.getCameraPositionAgent();
const LLVector3& pos_agent = getRenderPosition();
F32 dx = viewer_pos_agent.mV[VX] - pos_agent.mV[VX];
F32 dy = viewer_pos_agent.mV[VY] - pos_agent.mV[VY];
@@ -3602,7 +3596,7 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent)
// to try to get a min distance from face, subtract min_scale/2 from the range.
// This means we'll load too much detail sometimes, but that's better than not enough
// I don't think there's a better way to do this without calculating distance per-poly
F32 range = sqrt(dx*dx + dy*dy + dz*dz) - min_scale/2;
F32 range = sqrt(dx*dx + dy*dy + dz*dz) - min_scale/2.f;
LLViewerCamera* camera = LLViewerCamera::getInstance();
if (range < 0.001f || isHUDAttachment()) // range == zero
@@ -3781,10 +3775,9 @@ F32 LLViewerObject::getLinksetPhysicsCost()
F32 LLViewerObject::recursiveGetEstTrianglesMax() const
{
F32 est_tris = getEstTrianglesMax();
for (child_list_t::const_iterator iter = mChildList.begin();
iter != mChildList.end(); iter++)
for (const auto& iter : mChildList)
{
const LLViewerObject* child = *iter;
const LLViewerObject* child = iter;
if (!child->isAvatar())
{
est_tris += child->recursiveGetEstTrianglesMax();
@@ -3852,10 +3845,9 @@ U32 LLViewerObject::recursiveGetTriangleCount(S32* vcount) const
{
S32 total_tris = getTriangleCount(vcount);
LLViewerObject::const_child_list_t& child_list = getChildren();
for (LLViewerObject::const_child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
for (const auto& iter : child_list)
{
LLViewerObject* childp = *iter;
LLViewerObject* childp = iter;
if (childp)
{
total_tris += childp->getTriangleCount(vcount);
@@ -3882,13 +3874,11 @@ F32 LLViewerObject::recursiveGetScaledSurfaceArea() const
const LLVector3& scale = volume->getScale();
area += volume->getVolume()->getSurfaceArea() * llmax(llmax(scale.mV[0], scale.mV[1]), scale.mV[2]);
}
LLViewerObject::const_child_list_t children = volume->getChildren();
for (LLViewerObject::const_child_list_t::const_iterator child_iter = children.begin();
child_iter != children.end();
++child_iter)
LLViewerObject::const_child_list_t const& children = volume->getChildren();
for (const auto& child_iter : children)
{
LLViewerObject* child_obj = *child_iter;
LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
LLViewerObject* child_obj = child_iter;
LLVOVolume *child = child_obj ? child_obj->asVolume() : nullptr;
if (child && child->getVolume())
{
const LLVector3& scale = child->getScale();
@@ -3899,6 +3889,7 @@ F32 LLViewerObject::recursiveGetScaledSurfaceArea() const
}
return area;
}
void LLViewerObject::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
{
if(mDrawable.isNull())
@@ -5592,6 +5583,12 @@ LLVOAvatar* LLViewerObject::asAvatar()
return NULL;
}
// virtual
LLVOVolume* LLViewerObject::asVolume()
{
return nullptr;
}
// If this object is directly or indirectly parented by an avatar,
// return it. Normally getAvatar() is the correct function to call;
// it will give the avatar used for skinning. The exception is with

View File

@@ -69,6 +69,7 @@ class LLPrimitive;
class LLTextureEntry;
class LLVOAvatar;
class LLVOInventoryListener;
class LLVOVolume;
class LLViewerInventoryItem;
class LLViewerObject;
class LLViewerObjectMedia;
@@ -157,6 +158,7 @@ public:
BOOL isParticleSource() const;
virtual LLVOAvatar* asAvatar();
virtual LLVOVolume* asVolume();
LLVOAvatar* getAvatarAncestor();

View File

@@ -1116,7 +1116,8 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
LL_DEBUGS() << "Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << LL_ENDL;
LLVOVolume *obj = dynamic_cast<LLVOVolume*>(static_cast<LLViewerObject*>(pick_info.getObject()));
LLViewerObject* vobjp = static_cast<LLViewerObject*>(pick_info.getObject());
LLVOVolume *obj = vobjp ? vobjp->asVolume() : nullptr;
if (obj && !obj->getRegion()->getCapability("ObjectMedia").empty())
{

View File

@@ -6923,7 +6923,7 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, uuid_set_t*
}
}
LLVOVolume *vobj = dynamic_cast<LLVOVolume*>(vo);
LLVOVolume *vobj = vo->asVolume();
if (vobj && vobj->isRiggedMesh() &&
vobj->getVolume() && vobj->getVolume()->isMeshAssetLoaded() && gMeshRepo.meshRezEnabled())
{
@@ -10567,7 +10567,7 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
{{
LLViewerObject* attached_object = iter.first;
#endif
LLVOVolume *volume = dynamic_cast<LLVOVolume*>(attached_object);
LLVOVolume *volume = attached_object->asVolume();
if (volume)
{
volumes.push_back(volume);
@@ -10580,11 +10580,12 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
}
}
LLViewerObject::const_child_list_t& children = attached_object->getChildren();
for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
it != children.end(); ++it)
for (LLViewerObject* childp : children)
{
LLViewerObject *childp = *it;
LLVOVolume *volume = dynamic_cast<LLVOVolume*>(childp);
if (!childp)
continue;
LLVOVolume *volume = childp->asVolume();
if (volume)
{
volumes.push_back(volume);
@@ -10601,11 +10602,9 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
{
volumes.push_back(volp);
LLViewerObject::const_child_list_t& children = volp->getChildren();
for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
it != children.end(); ++it)
for (LLViewerObject* childp : children)
{
LLViewerObject *childp = *it;
LLVOVolume *volume = dynamic_cast<LLVOVolume*>(childp);
LLVOVolume *volume = childp ? childp->asVolume() : nullptr;
if (volume)
{
volumes.push_back(volume);
@@ -10950,7 +10949,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
++child_iter)
{
LLViewerObject* child_obj = *child_iter;
LLVOVolume *child = dynamic_cast<LLVOVolume*>(child_obj);
LLVOVolume *child = child_obj ? child_obj->asVolume() : nullptr;
if (child)
{
attachment_children_cost += child->getRenderCost(textures);
@@ -11007,7 +11006,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
iter != child_list.end(); ++iter)
{
LLViewerObject* childp = *iter;
const LLVOVolume* chld_volume = dynamic_cast<LLVOVolume*>(childp);
const LLVOVolume* chld_volume = childp ? childp->asVolume() : nullptr;
if (chld_volume)
{
// get cost and individual textures

View File

@@ -555,7 +555,7 @@ private:
// Impostors
//--------------------------------------------------------------------
public:
BOOL isImpostor() const;
virtual BOOL isImpostor() const;
BOOL shouldImpostor(const U32 rank_factor = 1) const;
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
@@ -570,6 +570,7 @@ public:
F32SecondsImplicit mLastImpostorUpdateFrameTime;
const LLVector3* getLastAnimExtents() const { return mLastAnimExtents; }
void setNeedsExtentUpdate(bool val) { mNeedsExtentUpdate = val; }
private:
LLVector3 mImpostorOffset;
LLVector2 mImpostorDim;

View File

@@ -869,6 +869,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
}
mRegionCrossingTimer.reset();
LLViewerObject::updateRegion(regionp);
gAgent.setIsCrossingRegion(false); // Attachments getting lost on TP
}
//--------------------------------------------------------------------

View File

@@ -265,6 +265,11 @@ LLVOVolume::~LLVOVolume()
}
}
LLVOVolume* LLVOVolume::asVolume()
{
return this;
}
void LLVOVolume::markDead()
{
if (!mDead)
@@ -3496,8 +3501,6 @@ bool LLVOVolume::isAnimatedObject() const
// virtual
void LLVOVolume::onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent)
{
LLVOVolume *old_volp = dynamic_cast<LLVOVolume*>(old_parent);
if (new_parent && !new_parent->isAvatar())
{
if (mControlAvatar.notNull())
@@ -3509,6 +3512,7 @@ void LLVOVolume::onReparent(LLViewerObject *old_parent, LLViewerObject *new_pare
av->markForDeath();
}
}
LLVOVolume *old_volp = old_parent ? old_parent->asVolume() : nullptr;
if (old_volp && old_volp->isAnimatedObject())
{
if (old_volp->getControlAvatar())
@@ -5247,7 +5251,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (bridge)
{
vobj = bridge->mDrawable->getVObj();
vol_obj = dynamic_cast<LLVOVolume*>(vobj);
vol_obj = vobj ? vobj->asVolume() : nullptr;
}
if (vol_obj)
{

View File

@@ -94,7 +94,7 @@ public:
};
// Class which embodies all Volume objects (with pcode LL_PCODE_VOLUME)
class LLVOVolume : public LLViewerObject
class LLVOVolume final : public LLViewerObject
{
LOG_CLASS(LLVOVolume);
protected:
@@ -126,7 +126,9 @@ public:
public:
LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
/*virtual*/ void markDead(); // Override (and call through to parent) to clean up media references
LLVOVolume* asVolume() final;
/*virtual*/ void markDead() override; // Override (and call through to parent) to clean up media references
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);

View File

@@ -1,5 +1,7 @@
# -*- cmake -*-
include(Variables)
add_subdirectory(base_basic)
add_subdirectory(base_media)
add_subdirectory(filepicker)

View File

@@ -15,14 +15,6 @@ include_directories(
### basic_plugin_base
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_base_SOURCE_FILES
basic_plugin_base.cpp
)
@@ -42,6 +34,8 @@ add_library(basic_plugin_base
${basic_plugin_base_SOURCE_FILES}
)
set_target_properties(basic_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(basic_plugin_base
PUBLIC
llcommon

View File

@@ -29,14 +29,6 @@ include_directories(
### media_plugin_base
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(media_plugin_base_SOURCE_FILES
media_plugin_base.cpp
)
@@ -56,6 +48,8 @@ add_library(media_plugin_base
${media_plugin_base_SOURCE_FILES}
)
set_target_properties(media_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_base
PUBLIC
llcommon

View File

@@ -2,6 +2,7 @@
project(media_plugin_cef)
include(Boost)
include(00-Common)
include(LLCommon)
include(LLImage)
@@ -14,6 +15,7 @@ include(PluginAPI)
include(MediaPluginBase)
include(OpenGL)
include(PulseAudio)
include(UI)
include(CEFPlugin)
@@ -35,12 +37,6 @@ include_directories(SYSTEM
### media_plugin_cef
if(NOT WORD_SIZE EQUAL 32)
if(NOT WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(NOT WINDOWS)
endif(NOT WORD_SIZE EQUAL 32)
set(media_plugin_cef_SOURCE_FILES
media_plugin_cef.cpp
)
@@ -52,11 +48,10 @@ set(media_plugin_cef_HEADER_FILES
set (media_plugin_cef_LINK_LIBRARIES
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
${CEF_PLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES})
# Select which VolumeCatcher implementation to use
if (LINUX)
if (PULSEAUDIO_FOUND)
@@ -89,11 +84,7 @@ add_library(media_plugin_cef
${media_plugin_cef_SOURCE_FILES}
)
add_dependencies(media_plugin_cef
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
set_target_properties(media_plugin_cef PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_cef
${media_plugin_cef_LINK_LIBRARIES}

View File

@@ -17,14 +17,6 @@ include_directories(
### basic_plugin_example
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_example_SOURCE_FILES
basic_plugin_example.cpp
)
@@ -34,13 +26,9 @@ add_library(basic_plugin_example
${basic_plugin_example_SOURCE_FILES}
)
target_link_libraries(basic_plugin_example
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}
)
set_target_properties(basic_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_dependencies(basic_plugin_example
target_link_libraries(basic_plugin_example
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}

View File

@@ -28,14 +28,6 @@ include_directories(
### media_plugin_example
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(media_plugin_example_SOURCE_FILES
media_plugin_example.cpp
)
@@ -45,6 +37,8 @@ add_library(media_plugin_example
${media_plugin_example_SOURCE_FILES}
)
set_target_properties(media_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_example
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
@@ -53,12 +47,6 @@ target_link_libraries(media_plugin_example
${PLUGIN_API_WINDOWS_LIBRARIES}
)
add_dependencies(media_plugin_example
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
if (WINDOWS)
set_target_properties(
media_plugin_example

View File

@@ -23,14 +23,6 @@ include_directories(
### basic_plugin_filepicker
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_filepicker_SOURCE_FILES
basic_plugin_filepicker.cpp
legacy.cpp
@@ -71,6 +63,8 @@ if (DARWIN)
set(OSX_FILE_LIBRARIES ${APPKIT_LIBRARY} ${CARBON_LIBRARY} ${IOKIT_LIBRARY})
endif (DARWIN)
set_target_properties(basic_plugin_filepicker PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(basic_plugin_filepicker
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
@@ -80,12 +74,6 @@ target_link_libraries(basic_plugin_filepicker
${OSX_FILE_LIBRARIES}
)
add_dependencies(basic_plugin_filepicker
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}
)
if (WINDOWS)
set_target_properties(
basic_plugin_filepicker

View File

@@ -13,6 +13,7 @@ include(Linking)
include(PluginAPI)
include(MediaPluginBase)
include(FindOpenGL)
include(Boost)
include(GStreamer010Plugin)
@@ -45,6 +46,8 @@ add_library(media_plugin_gstreamer010
${media_plugin_gstreamer010_SOURCE_FILES}
)
set_target_properties(media_plugin_gstreamer010 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_gstreamer010
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
@@ -53,9 +56,3 @@ target_link_libraries(media_plugin_gstreamer010
${GSTREAMER010_LIBRARIES}
)
add_dependencies(media_plugin_gstreamer010
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
)