Resolvendo conflito de merge e finalizando

master
olizinha 2025-01-30 20:58:29 -03:00
commit f3c8306f3d
8 changed files with 195 additions and 13 deletions

View File

@ -282,6 +282,10 @@ bool FloaterAO::postBuild()
mPreviousButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickPrevious, this));
mNextButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickNext, this));
// <AS:Chanayane> Double click on animation in AO
mAnimationList->setDoubleClickCallback(boost::bind(&FloaterAO::onDoubleClick, this));
// </AS:Chanayane>
updateSmart();
AOEngine::instance().setReloadCallback(boost::bind(&FloaterAO::updateList, this));
@ -780,6 +784,40 @@ void FloaterAO::onClickNext()
AOEngine::instance().cycle(AOEngine::CycleNext);
}
// <AS:Chanayane> Double click on animation in AO
void FloaterAO::onDoubleClick()
{
LLScrollListItem* item = mAnimationList->getFirstSelected();
if (!item)
{
return;
}
LLUUID* animUUID = (LLUUID*)item->getUserdata();
if (!animUUID)
{
return;
}
// do nothing if animation is for a different state than the active state
if (mSelectedState != AOEngine::instance().getCurrentState())
{
return;
}
// activate AO set if necessary
if (AOEngine::instance().getCurrentSet() != mSelectedSet)
{
// sync small set selector with main set selector
mSetSelectorSmall->selectNthItem(mSetSelector->getCurrentIndex());
LL_DEBUGS("AOEngine") << "Set activated: " << mSetSelector->getSelectedItemLabel() << LL_ENDL;
AOEngine::instance().selectSet(mSelectedSet);
}
AOEngine::instance().playAnimation(*animUUID);
}
// </AS:Chanayane>
void FloaterAO::onClickMore()
{
LLRect fullSize = gSavedPerAccountSettings.getRect("floater_rect_animation_overrider_full");

View File

@ -91,6 +91,10 @@ class FloaterAO
void onClickMore();
void onClickLess();
// <AS:Chanayane> Double click on animation in AO
void onDoubleClick();
// </AS:Chanayane>
void onAnimationChanged(const LLUUID& animation);
void reloading(bool reload);

View File

@ -960,6 +960,115 @@ void AOEngine::cycle(eCycleMode cycleMode)
}
}
// <AS:Chanayane> Double click on animation in AO
void AOEngine::playAnimation(const LLUUID& animation)
{
if (!mEnabled)
{
return;
}
if (!mCurrentSet)
{
LL_DEBUGS("AOEngine") << "cycle without set." << LL_ENDL;
return;
}
// do not cycle if we're sitting and sit-override is off
if (mLastMotion == ANIM_AGENT_SIT && !mCurrentSet->getSitOverride())
{
return;
}
// do not cycle if we're standing and mouselook stand override is disabled while being in mouselook
else if (mLastMotion == ANIM_AGENT_STAND && mCurrentSet->getMouselookStandDisable() && mInMouselook)
{
return;
}
AOSet::AOState* state = mCurrentSet->getStateByRemapID(mLastMotion);
if (!state)
{
LL_DEBUGS("AOEngine") << "cycle without state." << LL_ENDL;
return;
}
if (!state->mAnimations.size())
{
LL_DEBUGS("AOEngine") << "cycle without animations in state." << LL_ENDL;
return;
}
LLViewerInventoryItem* item = gInventory.getItem(animation);
AOSet::AOAnimation anim;
anim.mName = item->LLInventoryItem::getName();
anim.mInventoryUUID = item->getUUID();
anim.mOriginalUUID = item->getLinkedUUID();
anim.mAssetUUID = LLUUID::null;
// if we can find the original animation already right here, save its asset ID, otherwise this will
// be tried again in AOSet::getAnimationForState() and/or AOEngine::cycle()
if (item->getLinkedItem())
{
anim.mAssetUUID = item->getAssetUUID();
}
LLUUID newAnimation = anim.mAssetUUID;
LLUUID oldAnimation = state->mCurrentAnimationID;
// don't do anything if the animation didn't change
if (newAnimation == oldAnimation)
{
return;
}
mAnimationChangedSignal(LLUUID::null);
// Searches for the index of the animation
U32 idx = -1;
for (U32 i = 0; i < state->mAnimations.size(); i++)
{
if (state->mAnimations[i].mAssetUUID == newAnimation)
{
idx = i;
break;
}
}
if (idx < 0)
{
idx = 0;
}
state->mCurrentAnimation = idx;
state->mCurrentAnimationID = newAnimation;
if (newAnimation.notNull())
{
LL_DEBUGS("AOEngine") << "requesting animation start for motion " << gAnimLibrary.animationName(mLastMotion) << ": " << newAnimation << LL_ENDL;
gAgent.sendAnimationRequest(newAnimation, ANIM_REQUEST_START);
mAnimationChangedSignal(state->mAnimations[state->mCurrentAnimation].mInventoryUUID);
}
else
{
LL_DEBUGS("AOEngine") << "overrider came back with NULL animation for motion " << gAnimLibrary.animationName(mLastMotion) << "." << LL_ENDL;
}
if (oldAnimation.notNull())
{
LL_DEBUGS("AOEngine") << "Cycling state " << state->mName << " - stopping animation " << oldAnimation << LL_ENDL;
gAgent.sendAnimationRequest(oldAnimation, ANIM_REQUEST_STOP);
gAgentAvatarp->LLCharacter::stopMotion(oldAnimation);
}
}
const AOSet* AOEngine::getCurrentSet() const
{
return mCurrentSet;
}
const AOSet::AOState* AOEngine::getCurrentState() const
{
return mCurrentSet->getStateByRemapID(mLastMotion);
}
// </AS:Chanayane>
void AOEngine::updateSortOrder(AOSet::AOState* state)
{
for (U32 index = 0; index < state->mAnimations.size(); ++index)

View File

@ -123,6 +123,12 @@ class AOEngine
void cycleTimeout(const AOSet* set);
void cycle(eCycleMode cycleMode);
// <AS:Chanayane> Double click on animation in AO
void playAnimation(const LLUUID& animation);
const AOSet* getCurrentSet() const;
const AOSet::AOState* getCurrentState() const;
// </AS:Chanayane>
void inMouselook(bool mouselook);
void selectSet(AOSet* set);
AOSet* selectSetByName(const std::string& name);

View File

@ -28,11 +28,35 @@ if [[ -f "$CONFIG_FILE" ]]; then
echo "Notarized with id: [$match]"
else
echo "No match found"
exit 1
fi
# if [[ ! $match -eq 0 ]]; then
echo "Running Stapler"
xcrun stapler staple "$app_file"
# --- WAIT / RETRY LOGIC FOR STAPLER ---
# Try stapler up to 5 times with a 5-second delay in between attempts
max_attempts=5
sleep_seconds=5
attempt=1
while [[ $attempt -le $max_attempts ]]; do
echo "Running stapler (attempt $attempt of $max_attempts)..."
xcrun stapler staple "$app_file"
ret=$?
if [[ $ret -eq 0 ]]; then
echo "Stapling succeeded on attempt $attempt"
break
else
if [[ $attempt -lt $max_attempts ]]; then
echo "Stapling failed (Error $ret). Waiting $sleep_seconds seconds before retry..."
sleep $sleep_seconds
else
echo "Stapling failed after $max_attempts attempts, giving up."
exit 65
fi
fi
attempt=$((attempt + 1))
done
# Delete the zip file to stop it being packed in the dmg
rm -f "$zip_file"
if [[ $? -eq 0 ]]; then

View File

@ -103,6 +103,10 @@ echo "LIBGL_DRIVERS_PATH is ${LIBGL_DRIVERS_PATH}"
if [ "$GTK_IM_MODULE" = "scim" ]; then
export GTK_IM_MODULE=xim
fi
if [ "$XMODIFIERS" = "" ]; then
## IME is valid only for fcitx, not when using ibus
export XMODIFIERS="@im=fcitx"
fi
## - Automatically work around the ATI mouse cursor crash bug:
## (this workaround is disabled as most fglrx users do not see the bug)

View File

@ -129,16 +129,12 @@ void LLHUDText::render()
// If the current text object is highighed and the use hover highlight feature is enabled, then
// disable writing to the depth buffer
static LLCachedControl<bool> mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight");
if (mbUseHoverHighlight && mbIsHighlighted)
{
LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE);
}
//Else, use the standard method of writing to the depth buffer for all other non-highlighted text objects
else
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
}
// </FS:minerjr> [FIRE-35019]
// <FS:minerjr> [FIRE-35102] - Hover text appearing through walls in Beta 7.1.12.7737
// So it turns out when the LLGLDepthTest object goes out of scope, it reverts back
// to the previous state. So by having the LLGLDepthTest in the if statements, they were
// never applied.
LLGLDepthTest gls_depth(mbUseHoverHighlight && mbIsHighlighted ? GL_FALSE : GL_TRUE, GL_FALSE);
// </FS:minerjr> [FIRE-35019] </FS:minerjr> [FIRE-35102]
//LLGLDisable gls_stencil(GL_STENCIL_TEST);
renderText();
}