Port Hover Height from Alchemy, it's in quicksettings~

Lots and lots of other sync~
Also has a command /hover
Added /resync command from Alchemy.
This commit is contained in:
Inusaito Sayori
2015-03-25 08:04:24 -04:00
parent a54937b4b8
commit 398014b118
35 changed files with 534 additions and 111 deletions

View File

@@ -105,7 +105,8 @@ LLTexParamGlobalColor::LLTexParamGlobalColor(LLTexGlobalColor* tex_global_color)
void LLTexParamGlobalColor::onGlobalColorChanged(bool upload_bake)
{
mAvatarAppearance->onGlobalColorChanged(mTexGlobalColor, upload_bake);
if (mAvatarAppearance)
mAvatarAppearance->onGlobalColorChanged(mTexGlobalColor, upload_bake);
}
//-----------------------------------------------------------------------------

View File

@@ -269,6 +269,9 @@ public:
static std::vector< LLCharacter* > sInstances;
static BOOL sAllowInstancesChange ; //debug use
virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
const LLVector3& getHoverOffset() const { return mHoverOffset; }
protected:
LLMotionController mMotionController;
@@ -293,6 +296,8 @@ private:
visual_param_index_map_t mVisualParamIndexMap;
visual_param_name_map_t mVisualParamNameMap;
static LLStringTable sVisualParamNames;
LLVector3 mHoverOffset;
};
#endif // LL_LLCHARACTER_H

View File

@@ -1047,7 +1047,8 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
{
case CONSTRAINT_TARGET_TYPE_GROUND:
target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos);
// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl;
target_pos += mCharacter->getHoverOffset();
// LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
break;
case CONSTRAINT_TARGET_TYPE_BODY:
target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset);

View File

@@ -1384,6 +1384,8 @@ char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->
char const* const _PREHASH_AppearanceData = LLMessageStringTable::getInstance()->getString("AppearanceData");
char const* const _PREHASH_AppearanceVersion = LLMessageStringTable::getInstance()->getString("AppearanceVersion");
char const* const _PREHASH_CofVersion = LLMessageStringTable::getInstance()->getString("CofVersion");
char const* const _PREHASH_AppearanceHover = LLMessageStringTable::getInstance()->getString("AppearanceHover");
char const* const _PREHASH_HoverHeight = LLMessageStringTable::getInstance()->getString("HoverHeight");
// <FS:CR> Aurora Sim
char const* const _PREHASH_RegionSizeX = LLMessageStringTable::getInstance()->getString("RegionSizeX");

View File

@@ -1384,6 +1384,8 @@ extern char const* const _PREHASH_GroupAVSounds;
extern char const* const _PREHASH_AppearanceData;
extern char const* const _PREHASH_AppearanceVersion;
extern char const* const _PREHASH_CofVersion;
extern char const* const _PREHASH_AppearanceHover;
extern char const* const _PREHASH_HoverHeight;
// <FS:CR> Aurora Sim
extern char const* const _PREHASH_RegionSizeX;

View File

@@ -75,7 +75,8 @@ LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect,
mEditor( NULL ),
mTextBox( NULL ),
mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) )
mTextDisabledColor(LLUI::sColorsGroup->getColor("LabelDisabledColor")),
mEditorCommitSignal(NULL)
{
S32 top = getRect().getHeight();
S32 bottom = 0;
@@ -141,6 +142,11 @@ LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect,
updateText();
}
LLSliderCtrl::~LLSliderCtrl()
{
delete mEditorCommitSignal;
}
void LLSliderCtrl::setValue(F32 v, BOOL from_event)
{
mSlider->setValue( v, from_event );
@@ -238,6 +244,8 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata )
if( success )
{
self->onCommit();
if (self->mEditorCommitSignal)
(*(self->mEditorCommitSignal))(self, self->getValueF32());
}
else
{
@@ -350,6 +358,12 @@ boost::signals2::connection LLSliderCtrl::setSliderMouseUpCallback( const commit
return mSlider->setMouseUpCallback( cb );
}
boost::signals2::connection LLSliderCtrl::setSliderEditorCommitCallback(const commit_signal_t::slot_type& cb)
{
if (!mEditorCommitSignal) mEditorCommitSignal = new commit_signal_t();
return mEditorCommitSignal->connect(cb);
}
void LLSliderCtrl::onTabInto()
{
if( mEditor )

View File

@@ -62,7 +62,7 @@ public:
F32 initial_value, F32 min_value, F32 max_value, F32 increment,
const std::string& control_which = LLStringUtil::null );
virtual ~LLSliderCtrl() {} // Children all cleaned up by default view destructor.
virtual ~LLSliderCtrl();
virtual LLXMLNodePtr getXML(bool save_children = true) const;
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
@@ -99,6 +99,7 @@ public:
boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setSliderEditorCommitCallback(const commit_signal_t::slot_type& cb);
virtual void onTabInto();
@@ -137,6 +138,8 @@ private:
LLColor4 mTextEnabledColor;
LLColor4 mTextDisabledColor;
commit_signal_t* mEditorCommitSignal;
};
#endif // LL_LLSLIDERCTRL_H

View File

@@ -113,6 +113,28 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>AlchemyChatCommandHoverHeight</key>
<map>
<key>Comment</key>
<string>Command to hover your height or something</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>/hover</string>
</map>
<key>AlchemyChatCommandResyncAnim</key>
<map>
<key>Comment</key>
<string>Command to stop/start in order to resync animations</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>/resync</string>
</map>
<key>AlchemyConnectToNeighbors</key>
<map>
<key>Comment</key>
@@ -189,6 +211,17 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AlchemySitOnAway</key>
<map>
<key>Comment</key>
<string>Agent groundsits in away mode</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentPowerfulWizard</key>
<map>

View File

@@ -8,6 +8,17 @@
</array-->
<key>AvatarHoverOffsetZ</key>
<map>
<key>Comment</key>
<string>After-everything-else fixup for avatar Z position.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<!-- Begin AO -->
<key>AOConfigNotecardID</key>

View File

@@ -73,6 +73,8 @@ LLPrefsAscentSys::LLPrefsAscentSys()
getChild<LLUICtrl>("SinguCmdLineAway")->setCommitCallback(lineEditorControl);
getChild<LLUICtrl>("SinguCmdLineRegionSay")->setCommitCallback(lineEditorControl);
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
getChild<LLUICtrl>("AlchemyChatCommandResyncAnim")->setCommitCallback(lineEditorControl);
getChild<LLUICtrl>("AlchemyChatCommandHoverHeight")->setCommitCallback(lineEditorControl);
//Security ----------------------------------------------------------------------------
getChild<LLUICtrl>("UISndRestart")->setCommitCallback(lineEditorControl);
@@ -113,10 +115,8 @@ void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, const LLSD& value)
LLVector3d lpos_global = gAgent.getPositionGlobal();
if(gAudiop)
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
LLChat chat;
chat.mSourceType = CHAT_SOURCE_SYSTEM;
chat.mText = LLTrans::getString("PowerUser1") + "\n" + LLTrans::getString("PowerUser2") + "\n" + LLTrans::getString("Unlocked:") + "\n" + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5");
LLFloaterChat::addChat(chat);
void cmdline_printchat(const std::string& message);
cmdline_printchat(LLTrans::getString("PowerUser1") + '\n' + LLTrans::getString("PowerUser2") + '\n' + LLTrans::getString("Unlocked:") + '\n' + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5"));
}
}
else if (name == "next_owner_copy")
@@ -186,6 +186,8 @@ void LLPrefsAscentSys::refreshValues()
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
mCmdLineRegionSay = gSavedSettings.getString("SinguCmdLineRegionSay");
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
mCmdLineResync = gSavedSettings.getString("AlchemyChatCommandResyncAnim");
mCmdLineHover = gSavedSettings.getString("AlchemyChatCommandHoverHeight");
//Security ----------------------------------------------------------------------------
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
@@ -196,6 +198,7 @@ void LLPrefsAscentSys::refreshValues()
mLookAtLines = gSavedSettings.getBOOL("AlchemyLookAtLines");
mQuietSnapshotsToDisk = gSavedSettings.getBOOL("QuietSnapshotsToDisk");
mAnnounceBumps = gSavedSettings.getBOOL("AnnounceBumps");
mSitOnAway = gSavedSettings.getBOOL("AlchemySitOnAway");
mDetachBridge = gSavedSettings.getBOOL("SGDetachBridge");
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
@@ -257,6 +260,8 @@ void LLPrefsAscentSys::refresh()
childSetValue("SinguCmdLineAway", mCmdLineAway);
childSetValue("SinguCmdLineRegionSay", mCmdLineRegionSay);
childSetValue("SinguCmdLineURL", mCmdLineURL);
childSetValue("AlchemyChatCommandResyncAnim", mCmdLineResync);
childSetValue("AlchemyChatCommandHoverHeight", mCmdLineHover);
//Security ----------------------------------------------------------------------------
getChildView("UISndRestart")->setValue(mRestartSound);
@@ -328,6 +333,8 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
gSavedSettings.setString("SinguCmdLineRegionSay", mCmdLineRegionSay);
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
gSavedSettings.setString("AlchemyChatCommandResyncAnim", mCmdLineResync);
gSavedSettings.setString("AlchemyChatCommandHoverHeight", mCmdLineHover);
//Security ----------------------------------------------------------------------------
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
@@ -338,6 +345,7 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setBOOL("AlchemyLookAtLines", mLookAtLines);
gSavedSettings.setBOOL("QuietSnapshotsToDisk", mQuietSnapshotsToDisk);
gSavedSettings.setBOOL("AnnounceBumps", mAnnounceBumps);
gSavedSettings.setBOOL("AlchemySitOnAway", mSitOnAway);
gSavedSettings.setBOOL("SGDetachBridge", mDetachBridge);
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);

View File

@@ -96,6 +96,8 @@ private:
std::string mCmdLineAway;
std::string mCmdLineRegionSay;
std::string mCmdLineURL;
std::string mCmdLineResync;
std::string mCmdLineHover;
//Security ----------------------------------------------------------------------------
bool mBroadcastViewerEffects;
@@ -106,6 +108,7 @@ private:
bool mLookAtLines;
bool mQuietSnapshotsToDisk;
bool mAnnounceBumps;
bool mSitOnAway;
bool mDetachBridge;
bool mRevokePermsOnStandUp;
bool mDisableClickSit;

View File

@@ -241,6 +241,8 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
static LLCachedControl<std::string> sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
static LLCachedControl<std::string> sSinguCmdLineRegionSay(gSavedSettings, "SinguCmdLineRegionSay");
static LLCachedControl<std::string> sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
static LLCachedControl<std::string> sResyncAnimCommand(gSavedSettings, "AlchemyChatCommandResyncAnim", "/resync");
static LLCachedControl<std::string> sHoverHeight(gSavedSettings, "AlchemyChatCommandHoverHeight", "/hover");
if(sAscentCmdLine)
{
@@ -463,6 +465,34 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
}
return false;
}
else if (command == utf8str_tolower(sHoverHeight)) // Hover height
{
F32 height;
if (i >> height)
{
gSavedPerAccountSettings.set("AvatarHoverOffsetZ",
llclamp<F32>(height, MIN_HOVER_Z, MAX_HOVER_Z));
return false;
}
}
else if (command == utf8str_tolower(sResyncAnimCommand)) // Resync Animations
{
for (S32 i = 0; i < gObjectList.getNumObjects(); i++)
{
LLViewerObject* object = gObjectList.getObject(i);
if (object && object->isAvatar())
{
LLVOAvatar& avatarp = *(LLVOAvatar*)object;
for (LLVOAvatar::AnimIterator it = avatarp.mPlayingAnimations.begin(), end = avatarp.mPlayingAnimations.end(); it != end; ++it)
{
const std::pair<LLUUID, S32>& playpair = *it;
avatarp.stopMotion(playpair.first, TRUE);
avatarp.startMotion(playpair.first);
}
}
}
return false;
}
else if(command == "typingstop")
{
std::string text;

View File

@@ -46,13 +46,13 @@ void LFSimFeatureHandler::handleRegionChange()
{
if (LLViewerRegion* region = gAgent.getRegion())
{
if (region->getFeaturesReceived())
if (region->simulatorFeaturesReceived())
{
setSupportedFeatures();
}
else
{
region->setFeaturesReceivedCallback(boost::bind(&LFSimFeatureHandler::setSupportedFeatures, this));
region->setSimulatorFeaturesReceivedCallback(boost::bind(&LFSimFeatureHandler::setSupportedFeatures, this));
}
}
}

View File

@@ -396,7 +396,8 @@ LLAgent::LLAgent() :
mShowAvatar(TRUE),
mFrameAgent(),
mIsBusy(FALSE),
mIsAwaySitting(false),
mIsDoNotDisturb(false),
mControlFlags(0x00000000),
mbFlagsDirty(FALSE),
@@ -1427,12 +1428,13 @@ void LLAgent::setAFK()
{
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START);
setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP);
LL_INFOS("AFK") << "Setting Away" << LL_ENDL;
gAwayTimer.start();
if (isAgentAvatarValid() && !gAgentAvatarp->isSitting() && gSavedSettings.getBOOL("AlchemySitOnAway"))
gAgent.setSitDownAway(true);
if (gAFKMenu)
{
gAFKMenu->setLabel(LLTrans::getString("AvatarSetNotAway"));
}
}
}
@@ -1452,14 +1454,27 @@ void LLAgent::clearAFK()
{
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP);
clearControlFlags(AGENT_CONTROL_AWAY);
LL_INFOS("AFK") << "Clearing Away" << LL_ENDL;
if (isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgent.isAwaySitting())
gAgent.setSitDownAway(false);
if (gAFKMenu)
{
gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway"));
}
}
}
//-----------------------------------------------------------------------------
// setSitDownAway(bool)
//-----------------------------------------------------------------------------
void LLAgent::setSitDownAway(bool go_away)
{
if (go_away)
gAgent.sitDown();
else
gAgent.standUp();
mIsAwaySitting = go_away;
}
//-----------------------------------------------------------------------------
// getAFK()
//-----------------------------------------------------------------------------
@@ -1469,39 +1484,25 @@ BOOL LLAgent::getAFK() const
}
//-----------------------------------------------------------------------------
// setBusy()
// setDoNotDisturb()
//-----------------------------------------------------------------------------
void LLAgent::setBusy()
void LLAgent::setDoNotDisturb(bool pIsDoNotDisturb)
{
sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_START);
mIsBusy = TRUE;
sendAnimationRequest(ANIM_AGENT_BUSY, pIsDoNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP);
mIsDoNotDisturb = pIsDoNotDisturb;
if (gBusyMenu)
{
gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy"));
gBusyMenu->setLabel(LLTrans::getString(pIsDoNotDisturb ? "AvatarSetNotBusy" : "AvatarSetBusy"));
}
LLFloaterMute::getInstance()->updateButtons();
}
//-----------------------------------------------------------------------------
// clearBusy()
// isDoNotDisturb()
//-----------------------------------------------------------------------------
void LLAgent::clearBusy()
bool LLAgent::isDoNotDisturb() const
{
mIsBusy = FALSE;
sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_STOP);
if (gBusyMenu)
{
gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy"));
}
LLFloaterMute::getInstance()->updateButtons();
}
//-----------------------------------------------------------------------------
// getBusy()
//-----------------------------------------------------------------------------
BOOL LLAgent::getBusy() const
{
return mIsBusy;
return mIsDoNotDisturb;
}

View File

@@ -462,15 +462,20 @@ public:
/// @brief ground-sit at agent's current position
void sitDown();
void setSitDownAway(bool away);
bool isAwaySitting() const { return mIsAwaySitting; }
private:
bool mIsAwaySitting;
//--------------------------------------------------------------------
// Busy
// Do Not Disturb
//--------------------------------------------------------------------
public:
void setBusy();
void clearBusy();
BOOL getBusy() const;
void setDoNotDisturb(bool pIsDoNotDisturb);
bool isDoNotDisturb() const;
private:
BOOL mIsBusy;
bool mIsDoNotDisturb;
//--------------------------------------------------------------------
// Grab

View File

@@ -432,7 +432,7 @@ void LLAvatarActions::pay(const LLUUID& id)
LLNotification::Params params("BusyModePay");
params.functor(boost::bind(&LLAvatarActions::handlePay, _1, _2, id));
if (gAgent.getBusy())
if (gAgent.isDoNotDisturb())
{
// warn users of being in busy mode during a transaction
LLNotifications::instance().add(params);
@@ -1110,7 +1110,7 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response,
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
gAgent.clearBusy();
gAgent.setDoNotDisturb(false);
}
LLFloaterPay::payDirectly(&give_money, avatar_id, /*is_group=*/false);

View File

@@ -106,13 +106,13 @@ public:
{
if (LLViewerRegion* region = gAgent.getRegion())
{
if (region->getFeaturesReceived())
if (region->simulatorFeaturesReceived())
{
setMarketplaceURL(container);
}
else
{
region->setFeaturesReceivedCallback(boost::bind(&LLPanelDirMarket::setMarketplaceURL, this, container));
region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLPanelDirMarket::setMarketplaceURL, this, container));
}
}
}

View File

@@ -1478,7 +1478,7 @@ public:
time_t timestamp =
(time_t) message_params["timestamp"].asInteger();
BOOL is_busy = gAgent.getBusy();
bool is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = LLMuteList::getInstance()->isMuted(
from_id,
name,
@@ -1501,7 +1501,7 @@ public:
chat.mFromID = from_id;
chat.mFromName = name;
if (!is_linden && (is_busy || is_muted))
if (!is_linden && (is_do_not_disturb || is_muted))
{
return;
}

View File

@@ -322,7 +322,7 @@ void LLOverlayBar::refresh()
}
buttons_changed = true;
}
buttons_changed |= updateButtonVisiblity(mNotBusy,gAgent.getBusy()) != NULL;
buttons_changed |= updateButtonVisiblity(mNotBusy, gAgent.isDoNotDisturb()) != NULL;
buttons_changed |= updateButtonVisiblity(mFlyCam,LLViewerJoystick::getInstance()->getOverrideCamera()) != NULL;
buttons_changed |= updateButtonVisiblity(mMouseLook,gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)||gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX)) != NULL;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
@@ -374,7 +374,7 @@ void LLOverlayBar::onClickIMReceived(void*)
// static
void LLOverlayBar::onClickSetNotBusy(void*)
{
gAgent.clearBusy();
gAgent.setDoNotDisturb(false);
}

View File

@@ -5892,15 +5892,10 @@ class LLWorldSetBusy : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
if (gAgent.getBusy())
{
gAgent.clearBusy();
}
else
{
gAgent.setBusy();
bool busy = !gAgent.isDoNotDisturb();
gAgent.setDoNotDisturb(busy);
if (busy)
LLNotificationsUtil::add("BusyModeSet");
}
return true;
}
};
@@ -6033,7 +6028,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
S32 option = LLNotification::getSelectedOption(notification, response);
if (option == 0)
{
gAgent.clearBusy();
gAgent.setDoNotDisturb(false);
}
LLViewerObject* objectp = selection->getPrimaryObject();
@@ -6069,7 +6064,7 @@ void handle_give_money_dialog()
LLNotification::Params params("BusyModePay");
params.functor(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection()));
if (gAgent.getBusy())
if (gAgent.isDoNotDisturb())
{
// warn users of being in busy mode during a transaction
LLNotifications::instance().add(params);
@@ -9559,13 +9554,13 @@ void region_change()
LLViewerRegion* regionp = gAgent.getRegion();
if (!regionp) return;
if (regionp->getFeaturesReceived())
if (regionp->simulatorFeaturesReceived())
{
parse_simulator_features();
}
else
{
regionp->setFeaturesReceivedCallback(boost::bind(&parse_simulator_features));
regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&parse_simulator_features));
}
}

View File

@@ -1176,7 +1176,7 @@ bool check_asset_previewable(const LLAssetType::EType asset_type)
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)
{
if (gAgent.getBusy()) return;
if (gAgent.isDoNotDisturb()) return;
for (uuid_vec_t::const_iterator obj_iter = objects.begin();
obj_iter != objects.end();
++obj_iter)
@@ -1496,7 +1496,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
from_string = chatHistory_string = mFromName;
}
bool busy = gAgent.getBusy();
bool busy = gAgent.isDoNotDisturb();
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1)
bool fRlvNotifyAccepted = false;
@@ -1800,7 +1800,7 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
if (gAgent.getBusy() && info->mIM != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565)
if (gAgent.isDoNotDisturb() && info->mIM != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565)
{
// Until throttling is implemented, busy mode should reject inventory instead of silently
// accepting it. SEE SL-39554
@@ -2271,7 +2271,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
llinfos << "RegionID: " << region_id.asString() << llendl;
// </edit>
BOOL is_do_not_disturb = gAgent.getBusy();
bool is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
// object IMs contain sender object id in session_id (STORM-1209)
|| dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id);
@@ -3459,7 +3459,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id)
{
if (gAgent.getBusy())
if (gAgent.isDoNotDisturb())
{
std::string my_name;
LLAgentUI::buildFullname(my_name);
@@ -3578,7 +3578,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
if(!source_name.empty())
{
if (gAgent.getBusy()
if (gAgent.isDoNotDisturb()
|| LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat))
{
// automatically decline offer
@@ -3804,7 +3804,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
chat.mFromName = from_name;
}
BOOL is_do_not_disturb = gAgent.getBusy();
bool is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = FALSE;
BOOL is_linden = FALSE;
@@ -4783,14 +4783,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
}
// force simulator to recognize busy state
if (gAgent.getBusy())
{
gAgent.setBusy();
}
else
{
gAgent.clearBusy();
}
gAgent.setDoNotDisturb(gAgent.isDoNotDisturb());
if (isAgentAvatarValid())
{

View File

@@ -314,7 +314,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
mCapabilitiesReceived(false),
mFeaturesReceived(false),
mSimulatorFeaturesReceived(false),
mGamingFlags(0),
// <FS:CR> Aurora Sim
mWidth(region_width_meters)
@@ -1318,6 +1318,26 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb)
{
return mSimulatorFeaturesReceivedSignal.connect(cb);
}
void LLViewerRegion::setSimulatorFeaturesReceived(bool received)
{
mSimulatorFeaturesReceived = received;
if (received)
{
mSimulatorFeaturesReceivedSignal(getRegionID());
mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
}
}
bool LLViewerRegion::simulatorFeaturesReceived() const
{
return mSimulatorFeaturesReceived;
}
void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features)
{
sim_features = mSimulatorFeatures;
@@ -1331,9 +1351,7 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
LL_DEBUGS("SimFeatures") << "\n" << str.str() << LL_ENDL;
mSimulatorFeatures = sim_features;
mFeaturesReceived = true;
mFeaturesReceivedSignal(getRegionID());
mFeaturesReceivedSignal.disconnect_all_slots();
setSimulatorFeaturesReceived(true);
}
void LLViewerRegion::setGamingData(const LLSD& gaming_data)
@@ -2026,9 +2044,9 @@ void LLViewerRegion::setCapabilitiesReceived(bool received)
// in consumers by allowing them to expect this signal, regardless.
if (getCapability("SimulatorFeatures").empty())
{
mFeaturesReceived = true;
mFeaturesReceivedSignal(getRegionID());
mFeaturesReceivedSignal.disconnect_all_slots();
mSimulatorFeaturesReceived = true;
mSimulatorFeaturesReceivedSignal(getRegionID());
mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
}
}
}
@@ -2148,9 +2166,10 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const
mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean());
}
boost::signals2::connection LLViewerRegion::setFeaturesReceivedCallback(const features_received_signal_t::slot_type& cb)
bool LLViewerRegion::avatarHoverHeightEnabled() const
{
return mFeaturesReceivedSignal.connect(cb);
return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") &&
mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean());
}
void LLViewerRegion::resetMaterialsCapThrottle()

View File

@@ -105,7 +105,6 @@ public:
} eObjectPartitions;
typedef boost::signals2::signal<void(const LLUUID& region_id)> caps_received_signal_t;
typedef boost::signals2::signal<void(const LLUUID& region_id)> features_received_signal_t;
LLViewerRegion(const U64 &handle,
const LLHost &host,
@@ -284,9 +283,6 @@ public:
static bool isSpecialCapabilityName(const std::string &name);
void logActiveCapabilities() const;
boost::signals2::connection setFeaturesReceivedCallback(const features_received_signal_t::slot_type& cb);
bool getFeaturesReceived() const { return mFeaturesReceived; }
/// Get LLEventPump on which we listen for capability requests
/// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
LLEventPump& getCapAPI() const;
@@ -327,12 +323,19 @@ public:
bool meshRezEnabled() const;
bool meshUploadEnabled() const;
// has region received its simulator features list? Requires an additional query after caps received.
void setSimulatorFeaturesReceived(bool);
bool simulatorFeaturesReceived() const;
boost::signals2::connection setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb);
void getSimulatorFeatures(LLSD& info);
void setSimulatorFeatures(const LLSD& info);
bool dynamicPathfindingEnabled() const;
bool avatarHoverHeightEnabled() const;
typedef enum
{
CACHE_MISS_TYPE_FULL = 0,
@@ -480,9 +483,9 @@ private:
bool mAlive; // can become false if circuit disconnects
bool mCapabilitiesReceived;
bool mFeaturesReceived;
bool mSimulatorFeaturesReceived;
caps_received_signal_t mCapabilitiesReceivedSignal;
features_received_signal_t mFeaturesReceivedSignal;
caps_received_signal_t mSimulatorFeaturesReceivedSignal;
BOOL mReleaseNotesRequested;

View File

@@ -139,6 +139,11 @@ size_t strnlen(const char *s, size_t n)
}
#endif
const F32 MAX_HOVER_Z = 2.0;
const F32 MIN_HOVER_Z = -2.0;
// #define OUTPUT_BREAST_DATA
using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
@@ -1091,6 +1096,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFreezeTimeLangolier = freeze_time;
//VTResume(); // VTune
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
const bool needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
@@ -3817,7 +3823,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
S32 central_bake_version = -1;
if (getRegion())
LLViewerRegion* region = getRegion();
if (region)
{
central_bake_version = getRegion()->getCentralBakeVersion();
}
@@ -3830,9 +3837,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mUseServerBakes, central_bake_version);
std::string origin_string = bakedTextureOriginInfo();
debug_line += " [" + origin_string + "]";
S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion();
S32 last_request_cof_version = LLAppearanceMgr::instance().getLastUpdateRequestCOFVersion();
S32 last_received_cof_version = LLAppearanceMgr::instance().getLastAppearanceUpdateCOFVersion();
const LLAppearanceMgr& appmgr(LLAppearanceMgr::instance());
S32 curr_cof_version = appmgr.getCOFVersion();
S32 last_request_cof_version = appmgr.getLastUpdateRequestCOFVersion();
S32 last_received_cof_version = appmgr.getLastAppearanceUpdateCOFVersion();
if (isSelf())
{
debug_line += llformat(" - cof: %d req: %d rcv:%d",
@@ -3842,6 +3850,16 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
{
debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
}
debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]);
bool hover_enabled = region && region->avatarHoverHeightEnabled();
debug_line += hover_enabled ? " H" : " h";
const LLVector3& hover_offset = getHoverOffset();
if (hover_offset[2] != 0.0)
{
debug_line += llformat(" hov_z: %f", hover_offset[2]);
debug_line += llformat(" %s", (mIsSitting ? "S" : "T"));
debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-"));
}
addDebugText(debug_line);
}
if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
@@ -4023,6 +4041,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
LLVector3 xyVel = getVelocity();
xyVel.mV[VZ] = 0.0f;
speed = xyVel.length();
// remembering the value here prevents a display glitch if the
// animation gets toggled during this update.
bool was_sit_ground_constrained = isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED);
if (!(mIsSitting && getParent()))
{
@@ -4079,6 +4100,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// correct for the fact that the pelvis is not necessarily the center
// of the agent's physical representation
root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
if (!mIsSitting && !was_sit_ground_constrained)
{
root_pos += LLVector3d(getHoverOffset());
}
LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos);
@@ -4256,8 +4281,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
}
else if (mDrawable.notNull())
{
mRoot->setPosition(mDrawable->getPosition());
mRoot->setRotation(mDrawable->getRotation());
LLVector3 pos = mDrawable->getPosition();
const LLQuaternion& rot = mDrawable->getRotation();
pos += getHoverOffset() * rot;
mRoot->setPosition(pos);
mRoot->setRotation(rot);
}
//-------------------------------------------------------------------------
@@ -4272,6 +4300,19 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
else
updateMotions(LLCharacter::NORMAL_UPDATE);
// Special handling for sitting on ground.
if (!getParent() && (mIsSitting || was_sit_ground_constrained))
{
F32 off_z = LLVector3d(getHoverOffset()).mdV[VZ];
if (off_z != 0.0)
{
LLVector3 pos = mRoot->getWorldPosition();
pos.mV[VZ] += off_z;
mRoot->touch();
mRoot->setWorldPosition(pos);
}
}
// update head position
updateHeadOffset();
@@ -7934,6 +7975,8 @@ struct LLAppearanceMessageContents
//U32 appearance_flags = 0;
std::vector<F32> mParamWeights;
std::vector<LLVisualParam*> mParams;
LLVector3 mHoverOffset;
bool mHoverOffsetWasSet;
};
void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents)
@@ -7952,6 +7995,17 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
}
// Parse the AppearanceHover field, if any.
contents.mHoverOffsetWasSet = false;
if (mesgsys->has(_PREHASH_AppearanceHover))
{
LLVector3 hover;
mesgsys->getVector3Fast(_PREHASH_AppearanceHover, _PREHASH_HoverHeight, hover);
LL_DEBUGS("Avatar") << avString() << " hover received " << hover.mV[ VX ] << "," << hover.mV[ VY ] << "," << hover.mV[ VZ ] << LL_ENDL;
contents.mHoverOffset = hover;
contents.mHoverOffsetWasSet = true;
}
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
@@ -8264,6 +8318,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
}
if (contents.mHoverOffsetWasSet && !isSelf())
{
// Got an update for some other avatar
// Ignore updates for self, because we have a more authoritative value in the preferences.
setHoverOffset(contents.mHoverOffset);
LL_INFOS("Avatar") << avString() << "setting hover from message" << contents.mHoverOffset[2] << LL_ENDL;
}
if (!contents.mHoverOffsetWasSet && !isSelf())
{
// If we don't get a value at all, we are presumably in a
// region that does not support hover height.
llwarns << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL;
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
}
setCompositeUpdatesEnabled( TRUE );
// If all of the avatars are completely baked, release the global image caches to conserve memory.

View File

@@ -1076,6 +1076,9 @@ private:
extern const F32 SELF_ADDITIONAL_PRI;
extern const S32 MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL;
extern const F32 MAX_HOVER_Z;
extern const F32 MIN_HOVER_Z;
void dump_sequential_xml(const std::string outprefix, const LLSD& content);
#endif // LL_VOAVATAR_H

View File

@@ -136,6 +136,11 @@ struct LocalTextureData
LLTextureEntry *mTexEntry;
};
// TODO - this class doesn't really do anything, could just use a base
// class responder if nothing else gets added.
// Singu Note: Okay, sure, it's a responder ignore then!
typedef LLHTTPClient::ResponderIgnore LLHoverHeightResponder;
//-----------------------------------------------------------------------------
// Callback data
//-----------------------------------------------------------------------------
@@ -172,7 +177,10 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
mScreenp(NULL),
mLastRegionHandle(0),
mRegionCrossingCount(0),
mInitialBakesLoaded(false)
mInitialBakesLoaded(false),
// Value outside legal range, so will always be a mismatch the
// first time through.
mLastHoverOffsetSent(LLVector3(0.0f, 0.0f, -999.0f))
{
gAgentWearables.setAvatarObject(this);
gAgentCamera.setAvatarObject(this);
@@ -259,11 +267,40 @@ void LLVOAvatarSelf::initInstance()
return;
}
setHoverIfRegionEnabled();
//doPeriodically(output_self_av_texture_diagnostics, 30.0);
doPeriodically(update_avatar_rez_metrics, 5.0);
doPeriodically(check_for_unsupported_baked_appearance, 120.0);
}
void LLVOAvatarSelf::setHoverIfRegionEnabled()
{
LLViewerRegion* region = getRegion();
if (region && region->simulatorFeaturesReceived())
{
if (region->avatarHoverHeightEnabled())
{
F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
setHoverOffset(LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)));
LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << hover_z << LL_ENDL;
}
else
{
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
LL_INFOS("Avatar") << avString() << " zeroing hover height, region does not support" << LL_ENDL;
}
}
else
{
LL_INFOS("Avatar") << avString() << " region or simulator features not known, no change on hover" << LL_ENDL;
if (region)
{
region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
}
}
}
// virtual
void LLVOAvatarSelf::markDead()
{
@@ -808,6 +845,12 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
}
}
void LLVOAvatarSelf::onSimulatorFeaturesReceived(const LLUUID& region_id)
{
LL_INFOS("Avatar") << "simulator features received, setting hover based on region props" << LL_ENDL;
setHoverIfRegionEnabled();
}
//virtual
void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
{
@@ -826,6 +869,17 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
//LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region
// << " while pos_from_new_region is " << pos_from_new_region
// << LL_ENDL;
// Update hover height, or schedule callback, based on whether
// it's supported in this region.
if (regionp->simulatorFeaturesReceived())
{
setHoverIfRegionEnabled();
}
else
{
regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
}
}
if (!regionp || (regionp->getHandle() != mLastRegionHandle))
@@ -3051,6 +3105,39 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
return success;
}
//------------------------------------------------------------------------
// sendHoverHeight()
//------------------------------------------------------------------------
void LLVOAvatarSelf::sendHoverHeight() const
{
std::string url = gAgent.getRegion()->getCapability("AgentPreferences");
if (!url.empty())
{
LLSD update = LLSD::emptyMap();
const LLVector3& hover_offset = getHoverOffset();
update["hover_height"] = hover_offset[2];
LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL;
LLHTTPClient::post(url, update, new LLHoverHeightResponder);
mLastHoverOffsetSent = hover_offset;
}
}
void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_update)
{
if (getHoverOffset() != hover_offset)
{
LL_INFOS("Avatar") << avString() << " setting hover due to change " << hover_offset[2] << LL_ENDL;
LLVOAvatar::setHoverOffset(hover_offset, send_update);
}
if (send_update && (hover_offset != mLastHoverOffsetSent))
{
LL_INFOS("Avatar") << avString() << " sending hover due to change " << hover_offset[2] << LL_ENDL;
sendHoverHeight();
}
}
//------------------------------------------------------------------------
// needsRenderBeam()

View File

@@ -84,6 +84,9 @@ protected:
// LLViewerObject interface and related
//--------------------------------------------------------------------
public:
boost::signals2::connection mRegionChangedSlot;
void onSimulatorFeaturesReceived(const LLUUID& region_id);
/*virtual*/ void updateRegion(LLViewerRegion *regionp);
/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
@@ -356,6 +359,14 @@ public:
public:
bool sendAppearanceMessage(LLMessageSystem *mesgsys) const;
// -- care and feeding of hover height.
void setHoverIfRegionEnabled();
void sendHoverHeight() const;
/*virtual*/ void setHoverOffset(const LLVector3& hover_offset, bool send_update=true);
private:
mutable LLVector3 mLastHoverOffsetSent;
public:
LLVector3 getLegacyAvatarOffset() const;

View File

@@ -3743,7 +3743,7 @@ void LLVivoxVoiceClient::messageEvent(
sessionState *session = findSession(sessionHandle);
if(session)
{
bool is_do_not_disturb = gAgent.getBusy();
bool is_do_not_disturb = gAgent.isDoNotDisturb();
bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat);
bool is_linden = LLMuteList::getInstance()->isLinden(session->mName);
LLChat chat;

View File

@@ -12,7 +12,7 @@
<panel border="false" label="Credits" height="386" name="credits_panel">
<!--Note to Translators: Please do not translate the following text_editor-->
<text_editor enabled="false" follows="left|top" bg_readonly_color="transparent" left="3" max_length="65536" name="credits_editor" top="-1" bottom="0" width="443" word_wrap="true">
Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Aleric Inglewood, Narv Czervik, Tigh MacFanatic, Inusaito Kanya, Sovereign Engineer and Latif Khalifa, with contributions by Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, McCabe Maxsted, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Thickbrick Sleaford, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is based upon Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code.
Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Inusaito Kanya, Aleric Inglewood, Tigh MacFanatic, Sovereign Engineer and Cinder Roxley, with contributions by Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, Latif Khalifa, McCabe Maxsted, Narv Czervik, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Sim Federal, Thickbrick Sleaford, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is based upon Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code.
Singularity Viewer includes source code contributions of the following residents: Able Whitman, Adam Marker, Agathos Frascati, Aimee Trescothick, Alejandro Rosenthal, Aleric Inglewood, Alissa Sabre, Angus Boyd, Ann Congrejo, Argent Stonecutter, Asuka Neely, Balp Allen, Benja Kepler, Biancaluce Robbiani, Blakar Ogre, blino Nakamura, Boroondas Gupte, Bulli Schumann, bushing Spatula, Carjay McGinnis, Catherine Pfeffer, Celierra Darling, Cron Stardust, Dale Glass, Drewan Keats, Dylan Haskell, Dzonatas Sol, Eddy Stryker, EponymousDylan Ra, Eva Nowicka, Farallon Greyskin, Feep Larsson, Flemming Congrejo, Fluf Fredriksson, Fractured Crystal, Fremont Cunningham, Geneko Nemeth, Gigs Taggart, Ginko Bayliss, Grazer Kline, Gudmund Shepherd, Hamncheese Omlet, HappySmurf Papp, Henri Beauchamp, Hikkoshi Sakai, Hiro Sommambulist, Hoze Menges, Ian Kas, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Joghert LeSabre, Kage Pixel, Ken March, Kerutsen Sellery, Khyota Wulluf, Kunnis Basiat, Lisa Lowe, Lockhart Cordoso, maciek marksman, Magnus Balczo, Malwina Dollinger, march Korda, Matthew Dowd, McCabe Maxsted, Michelle2 Zenovka, Mm Alder, Mr Greggan, Nicholaz Beresford, Nounouch Hapmouche, Patric Mills, Paul Churchill, Paula Innis, Peekay Semyorka, Peter Lameth, Pf Shan, princess niven, Renault Clio, Ringo Tuxing, Robin Cornelius, Ryozu Kojima, Salahzar Stenvaag, Sammy Frederix, Scrippy Scofield, Seg Baphomet, Sergen Davies, SignpostMarv Martin, Simon Nolan, SpacedOut Frye, Sporked Friis, Stevex Janus, Still Defiant, Strife Onizuka, Tayra Dagostino, TBBle Kurosawa, Teardrops Fall, tenebrous pau, Tharax Ferraris, Thickbrick Sleaford, Thraxis Epsilon, tiamat bingyi, TraductoresAnonimos Alter, Tue Torok, Vadim Bigbear, Vixen Heron, Whoops Babii, Wilton Lundquist, Zarkonnen Decosta, Zi Ree, and Zipherius Turas.

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel follows="left|right|bottom|top" height="200" left="-1" mouse_opaque="false"
user_resize="false" name="overlay" use_bounding_rect="true" width="728">
<layout_stack bottom="0" follows="left|right|bottom" height="200" left="0"
<layout_stack bottom="0" follows="left|right|bottom" height="220" left="0"
mouse_opaque="false" name="overlay_layout_panel" orientation="horizontal"
right="-1" use_bounding_rect="true">
<layout_panel auto_resize="true" bottom="0" left="0" min_width="420" mouse_opaque="false"

View File

@@ -62,10 +62,11 @@
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" tool_tip="Clears the Chat History to prevent lag effects from chat spammers." name="AscentCmdLineClearChat" width="200"/>
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="cmd_line_text_16">Open url/slurl (usage: cmd slurl)</text>
<line_editor enabled_control="AscentCmdLine" bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineURL" width="200"/>
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="hover_txt">Resync Animations (usage: cmd)</text>
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AlchemyChatCommandResyncAnim" width="200"/>
<!-- Column Split -->
<view_border enabled_control="AscentCmdLine" bevel_style="none" border_thickness="1" bottom_delta="-5" follows="top|left" height="333"
left="230" name="CmdDivisor" width="0"/>
<text enabled_control="AscentCmdLine" bottom_delta="315" follows="top" height="16" left_delta="10" name="cmd_line_text_9">Change Draw Distance (usage: cmd meters)</text>
<view_border enabled_control="AscentCmdLine" bevel_style="none" border_thickness="1" bottom_delta="-5" follows="top|left" height="371" left="230" name="CmdDivisor" width="0"/>
<text enabled_control="AscentCmdLine" bottom_delta="353" follows="top" height="16" left_delta="10" name="cmd_line_text_9">Change Draw Distance (usage: cmd meters)</text>
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AscentCmdLineDrawDistance" width="200"/>
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="cmd_line_text_10">Teleport to cam position (usage: cmd)</text>
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AscentCmdTeleportToCam" width="200"/>
@@ -82,6 +83,8 @@
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineAway" width="200"/>
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="cmd_line_text_15">Send region message (usage: cmd msg)</text>
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineRegionSay" tool_tip="Only works on permissive regions (Estate Managers only)" width="200"/>
<text enabled_control="AscentCmdLine" bottom_delta="-18" follows="top" height="16" name="hover_txt">Hover Height (usage: cmd height)</text>
<line_editor enabled_control="AscentCmdLine" bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AlchemyChatCommandHoverHeight" width="200"/>
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Security &amp; Privacy" name="Security">
@@ -98,6 +101,7 @@
</combo_box>
<check_box bottom_delta="-18" left="10" control_name="AlchemyLookAtLines" follows="top" label="Show a line from look at beacon to avatar" tool_tip="See a line connecting the camera focus point to the avatar. Useful to find where they are." name="lineslookat"/>
<check_box bottom_delta="-20" control_name="AnnounceBumps" follows="top" label="Announce in chat when people bump you" name="announce_bumps"/>
<check_box bottom_delta="-20" control_name="AlchemySitOnAway" follows="top" label="Sit down when you go AFK" name="AlchemySitOnAway"/>
<check_box bottom_delta="-20" control_name="SGDetachBridge" follows="top" initial_value="false" label="Auto detach LSL Bridge" tool_tip="Automatically detach LSL Bridge of Phoenix or Firestorm viewer." name="detach_bridge"/>
<check_box bottom_delta="-20" follows="top" label="Render muted avatars" name="render_muted" control_name="LiruLegacyDisplayMuteds"/>
<check_box bottom_delta="-20" control_name="QuietSnapshotsToDisk" follows="top" initial_value="false" label="Quiet Snapshots to Disk" tool_tip="Doesn't make a camera sound nor alert everyone when you take a snapshot to your computer." name="quiet_snapshots_check"/>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel bg_visible="false" border="false" border_visible="false" height="180" name="Adv_Settings" use_bounding_rect="true" width="220">
<panel bottom="1" filename="panel_bg_tab.xml" height="194" width="197"/>
<text bottom="169" left="5" height="20" width="190" name="Camera Preset:">Cam Preset:</text>
<button bottom="171" left="81" width="20" height="20" label="" toggle="true" image_selected="Cam_Preset_Back_On.png" image_unselected="Cam_Preset_Back_Off.png" name="Rear" tool_tip="Rear View">
<panel bg_visible="false" border="false" border_visible="false" height="200" name="Adv_Settings" use_bounding_rect="true" width="220">
<panel bottom="1" filename="panel_bg_tab.xml" height="214" width="197"/>
<text bottom="189" left="5" height="20" width="190" name="Camera Preset:">Cam Preset:</text>
<button bottom="191" left="81" width="20" height="20" label="" toggle="true" image_selected="Cam_Preset_Back_On.png" image_unselected="Cam_Preset_Back_Off.png" name="Rear" tool_tip="Rear View">
<button.commit_callback function="Wlf.ChangeCameraPreset" parameter="0"/>
</button>
<button bottom_delta="0" left_delta="20" width="20" height="20" label="" toggle="true" image_selected="Cam_Preset_Front_On.png" image_unselected="Cam_Preset_Front_Off.png" name="Front" tool_tip="Front View">
@@ -12,6 +12,7 @@
<button.commit_callback function="Wlf.ChangeCameraPreset" parameter="2"/>
</button>
<slider bottom_delta="-20" left="5" control_name="RenderFarClip" decimal_digits="0" height="20" increment="8" label="Draw Dist.:" can_edit_text="true" label_width="60" max_val="1024" min_val="24" val_width="36" name="DrawDistance" width="190" tool_tip="Change your Draw Distance"/>
<slider bottom_delta="-20" control_name="AvatarHoverOffsetZ" height="20" increment=".001" label="Hover:" can_edit_text="true" label_width="60" max_val="5" min_val="-5" val_width="36" name="HoverHeightSlider" width="189"/>
<slider bottom_delta="-20" control_name="RenderMaxPartCount" decimal_digits="0" height="20" increment="256" label="Particles:" can_edit_text="true" label_width="60" max_val="8192" min_val="0" val_width="36" name="MaxParticleCount" width="190" tool_tip="Amount of particles to render"/>
<slider bottom_delta="-20" control_name="RenderAvatarMaxVisible" decimal_digits="0" height="20" increment="1" label="Max Avs:" can_edit_text="true" label_width="60" max_val="50" min_val="1" val_width="36" name="RenderAvatarMaxVisible" width="190" tool_tip="How many avatars to fully render on screen. Lowering this greatly improves FPS in crowded situations. Requires Avatar Impostors to be on. [Default 35]"/>
<slider bottom_delta="-20" control_name="RenderVolumeLODFactor" height="20" increment="0.125" label="Obj. Detail:" can_edit_text="true" label_width="60" max_val="4" min_val="0.5" name="Object Detail" val_width="36" width="190" tool_tip="Controls level of detail of primitives (multiplier for current screen area when calculated level of detail[0.5 to 2.0 is stable])"/>

View File

@@ -47,13 +47,21 @@
#include "llfloaterwindlight.h"
#include "llfloaterwater.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "lldaycyclemanager.h"
#include "llenvmanager.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwaterparammanager.h"
#include "llwlparamset.h"
#include "llwlparammanager.h"
// Hover funcs
void syncFromPreferenceSetting(LLSliderCtrl* sldrCtrl);
void onHoverSliderMoved(const LLSD& val);
void onHoverSliderFinalCommit(const LLSD& val);
wlfPanel_AdvSettings::wlfPanel_AdvSettings() : mExpanded(false)
{
setVisible(false);
@@ -76,6 +84,7 @@ void wlfPanel_AdvSettings::build()
mConnections.clear();
deleteAllChildren();
mExpanded = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
if (mRegionChangedSlot.connected()) mRegionChangedSlot.disconnect();
LLUICtrlFactory::instance().buildPanel(this, mExpanded ? "wlfPanel_AdvSettings_expanded.xml" : "wlfPanel_AdvSettings.xml", &getFactoryMap());
}
@@ -140,6 +149,7 @@ BOOL wlfPanel_AdvSettings::postBuild()
if (mExpanded)
{
// Windlight
getChild<LLCheckBoxCtrl>("use_estate_wl")->setCommitCallback(boost::bind(&wlfPanel_AdvSettings::onUseRegionSettings, this, _2));
mWaterPresetCombo = getChild<LLComboBox>("WLWaterPresetsCombo");
@@ -174,6 +184,7 @@ BOOL wlfPanel_AdvSettings::postBuild()
updateTimeSlider();
updateRlvVisibility();
// Camera Presets
const U32 preset(gSavedSettings.getU32("CameraPreset"));
if (preset == CAMERA_PRESET_REAR_VIEW)
getChildView("Rear")->setValue(true);
@@ -181,6 +192,35 @@ BOOL wlfPanel_AdvSettings::postBuild()
getChildView("Front")->setValue(true);
else if (preset == CAMERA_PRESET_GROUP_VIEW)
getChildView("Group")->setValue(true);
// Hover height
mHoverHeight = getChild<LLSliderCtrl>("HoverHeightSlider");
mHoverHeight->setMinValue(MIN_HOVER_Z);
mHoverHeight->setMaxValue(MAX_HOVER_Z);
mHoverHeight->setSliderMouseUpCallback(boost::bind(onHoverSliderFinalCommit, _2));
mHoverHeight->setSliderEditorCommitCallback(boost::bind(onHoverSliderFinalCommit, _2));
mHoverHeight->setCommitCallback(boost::bind(onHoverSliderMoved, _2));
// Initialize slider from pref setting.
syncFromPreferenceSetting(mHoverHeight);
// Update slider on future pref changes.
if (LLControlVariable* control = gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
{
control->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, mHoverHeight));
}
else
{
llwarns << "Control not found for AvatarHoverOffsetZ" << LL_ENDL;
}
updateEditHoverEnabled();
if (!mRegionChangedSlot.connected())
{
mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&wlfPanel_AdvSettings::onRegionChanged, this));
}
// Set up based on initial region.
onRegionChanged();
}
return TRUE;
}
@@ -411,3 +451,71 @@ void wlfPanel_AdvSettings::updateTimeSlider()
}
mTimeSlider->setValue(val);
}
// Hover junk
void syncFromPreferenceSetting(LLSliderCtrl* sldrCtrl)
{
F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
sldrCtrl->setValue(value,FALSE);
if (isAgentAvatarValid())
{
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL;
gAgentAvatarp->setHoverOffset(offset);
}
}
void onHoverSliderMoved(const LLSD& val)
{
F32 value = val.asFloat();
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL;
gAgentAvatarp->setHoverOffset(offset, false);
}
// Do send-to-the-server work when slider drag completes, or new
// value entered as text.
void onHoverSliderFinalCommit(const LLSD& val)
{
F32 value = val.asFloat();
gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", value);
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
}
void wlfPanel_AdvSettings::onRegionChanged()
{
LLViewerRegion* region = gAgent.getRegion();
if (region && region->simulatorFeaturesReceived())
{
updateEditHoverEnabled();
}
else if (region)
{
region->setSimulatorFeaturesReceivedCallback(boost::bind(&wlfPanel_AdvSettings::onSimulatorFeaturesReceived, this, _1));
}
}
void wlfPanel_AdvSettings::onSimulatorFeaturesReceived(const LLUUID& region_id)
{
const LLViewerRegion* region = gAgent.getRegion();
if (region && (region->getRegionID()==region_id))
{
updateEditHoverEnabled();
}
}
void wlfPanel_AdvSettings::updateEditHoverEnabled()
{
const LLViewerRegion* region = gAgent.getRegion();
bool enabled = region && region->avatarHoverHeightEnabled();
mHoverHeight->setEnabled(enabled);
if (enabled)
{
syncFromPreferenceSetting(mHoverHeight);
}
}

View File

@@ -79,14 +79,20 @@ protected:
// void populateDayCyclePresetsList();
void updateTimeSlider();
void onRegionChanged();
void onSimulatorFeaturesReceived(const LLUUID& region_id);
void updateEditHoverEnabled();
LLComboBox* mWaterPresetCombo;
LLComboBox* mSkyPresetCombo;
// LLComboBox* mDayCyclePresetCombo;
LLSliderCtrl* mTimeSlider;
LLSliderCtrl* mHoverHeight;
bool mExpanded;
boost::ptr_list<boost::signals2::scoped_connection> mConnections;
boost::signals2::connection mRegionChangedSlot;
};
#endif // LL_wlfPanel_AdvSettings_H

View File

@@ -3594,6 +3594,10 @@ version 2.0
{ CofVersion S32 }
{ Flags U32 }
}
{
AppearanceHover Variable
{ HoverHeight LLVector3 }
}
}
// AvatarSitResponse - response to a request to sit on an object