newview V3 partial merge.

This commit is contained in:
Shyotl
2011-08-30 01:05:59 -05:00
parent 8d23a7d1d4
commit fd317a4092
29 changed files with 390 additions and 350 deletions

View File

@@ -248,7 +248,8 @@ LLAgent::LLAgent() :
mFirstLogin(FALSE),
mGenderChosen(FALSE),
mAppearanceSerialNum(0),
mMouselookModeInSignal(NULL),
mMouselookModeOutSignal(NULL),
mPendingLure(NULL)
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
@@ -295,6 +296,11 @@ LLAgent::~LLAgent()
{
cleanup();
delete mMouselookModeInSignal;
mMouselookModeInSignal = NULL;
delete mMouselookModeOutSignal;
mMouselookModeOutSignal = NULL;
delete mAgentAccess;
mAgentAccess = NULL;
delete mEffectColor;
@@ -544,7 +550,7 @@ void LLAgent::setFlying(BOOL fly)
{
if (isAgentAvatarValid())
{
if(mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != mAvatarObject->mSignaledAnimations.end())
if(fly && mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != mAvatarObject->mSignaledAnimations.end())
{
return;
}
@@ -1846,6 +1852,11 @@ void LLAgent::endAnimationUpdateUI()
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
if (mMouselookModeOutSignal)
{
(*mMouselookModeOutSignal)();
}
// Only pop if we have pushed...
if (TRUE == mViewsPushed)
{
@@ -1938,6 +1949,10 @@ void LLAgent::endAnimationUpdateUI()
mViewsPushed = TRUE;
if (mMouselookModeInSignal)
{
(*mMouselookModeInSignal)();
}
gFloaterView->pushVisibleAll(FALSE, get_skip_list());
if( gMorphView )
@@ -2028,6 +2043,17 @@ void LLAgent::endAnimationUpdateUI()
gAgentCamera.updateLastCamera();
}
boost::signals2::connection LLAgent::setMouselookModeInCallback( const camera_signal_t::slot_type& cb )
{
if (!mMouselookModeInSignal) mMouselookModeInSignal = new camera_signal_t();
return mMouselookModeInSignal->connect(cb);
}
boost::signals2::connection LLAgent::setMouselookModeOutCallback( const camera_signal_t::slot_type& cb )
{
if (!mMouselookModeOutSignal) mMouselookModeOutSignal = new camera_signal_t();
return mMouselookModeOutSignal->connect(cb);
}
//-----------------------------------------------------------------------------
// heardChat()
@@ -2198,6 +2224,11 @@ bool LLAgent::isGodlike() const
return mAgentAccess->isGodlike();
}
bool LLAgent::isGodlikeWithoutAdminMenuFakery() const
{
return mAgentAccess->isGodlikeWithoutAdminMenuFakery();
}
U8 LLAgent::getGodLevel() const
{
return mAgentAccess->getGodLevel();
@@ -3202,7 +3233,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
{
gAgentQueryManager.mNumPendingQueries--;
if (!isAgentAvatarValid())
if (!isAgentAvatarValid() || gAgent.getAvatarObject()->isDead())
{
llwarns << "No avatar for user in cached texture update!" << llendl;
return;
@@ -3943,6 +3974,16 @@ void LLAgent::sendAgentDataUpdateRequest()
sendReliableMessage();
}
void LLAgent::sendAgentUserInfoRequest()
{
if(getID().isNull())
return; // not logged in
gMessageSystem->newMessageFast(_PREHASH_UserInfoRequest);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID());
sendReliableMessage();
}
void LLAgent::observeFriends()
{
@@ -4006,6 +4047,18 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename)
}//end for (all message sets in xml file)
}
void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& directory_visibility )
{
gMessageSystem->newMessageFast(_PREHASH_UpdateUserInfo);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID());
gMessageSystem->nextBlockFast(_PREHASH_UserData);
gMessageSystem->addBOOLFast(_PREHASH_IMViaEMail, im_via_email);
gMessageSystem->addString("DirectoryVisibility", directory_visibility);
gAgent.sendReliableMessage();
}
// Draw a representation of current autopilot target
void LLAgent::renderAutoPilotTarget()
{