Updates and clean up and frosting, oh my~

Removes old code for permitting emerald attachment points
Removes other old dead code...
Updates RLVa a bit.
Adds more translation flexibility via strings.xml
This commit is contained in:
Lirusaito
2013-03-24 12:29:58 -04:00
parent 43ed77f4d5
commit 7aa0b439a8
15 changed files with 750 additions and 1194 deletions

View File

@@ -219,10 +219,6 @@ public:
virtual void saveAs() {}
virtual void saveAsType(BOOL type=false) {}
// <edit>
virtual LLUUID getItemID() { return LLUUID::null; }
// </edit>
void setSnapTarget(LLHandle<LLFloater> handle) { mSnappedTo = handle; }
void clearSnapTarget() { mSnappedTo.markDead(); }
LLHandle<LLFloater> getSnapTarget() const { return mSnappedTo; }

View File

@@ -726,6 +726,17 @@ Found in Advanced->Rendering->Info Displays</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FakeAway</key>
<map>
<key>HideFromEditor</key>
<integer>1</integer>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>InstantMessageLogPathAnyAccount</key>
<map>
<key>Comment</key>

View File

@@ -230,7 +230,6 @@ private:
//
BOOL LLAgent::exlPhantom = 0;
BOOL LLAgent::mForceTPose = 0;
const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f;
@@ -765,13 +764,6 @@ void LLAgent::togglePhantom()
setPhantom( phan );
}
void LLAgent::toggleTPosed()
{
BOOL posed = !(mForceTPose);
setTPosed(posed);
}
void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id)
{
llinfos << "called" << llendl;
@@ -1315,17 +1307,6 @@ LLQuaternion LLAgent::getQuat() const
//-----------------------------------------------------------------------------
U32 LLAgent::getControlFlags()
{
/*
// HACK -- avoids maintenance of control flags when camera mode is turned on or off,
// only worries about it when the flags are measured
if (mCameraMode == CAMERA_MODE_MOUSELOOK)
{
if ( !(mControlFlags & AGENT_CONTROL_MOUSELOOK) )
{
mControlFlags |= AGENT_CONTROL_MOUSELOOK;
}
}
*/
return mControlFlags;
}
@@ -1420,7 +1401,6 @@ void LLAgent::setAFK()
void LLAgent::clearAFK()
{
gAwayTriggerTimer.reset();
if (!gSavedSettings.controlExists("FakeAway")) gSavedSettings.declareBOOL("FakeAway", FALSE, "", NO_PERSIST);
if (gSavedSettings.getBOOL("FakeAway") == TRUE) return;
// Gods can sometimes get into away state (via gestures)
@@ -2035,6 +2015,7 @@ void LLAgent::endAnimationUpdateUI()
{
(*mMouselookModeOutSignal)();
}
// Only pop if we have pushed...
if (TRUE == mViewsPushed)
{
@@ -3102,13 +3083,13 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
void LLAgent::setAlwaysRun()
{
mbAlwaysRun = true;//(!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN));
mbAlwaysRun = (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN));
sendWalkRun();
}
void LLAgent::setTempRun()
{
mbTempRun = true;//(!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_TEMPRUN));
mbTempRun = (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_TEMPRUN));
sendWalkRun();
}
@@ -4092,6 +4073,7 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
return;
}
// [/RLVa:KB]
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLandmark(landmark_asset_id));
startTeleportRequest();
}
@@ -4189,6 +4171,7 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
}
}
// [/RLVa:KB]
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocation(pos_global));
startTeleportRequest();
}
@@ -4261,6 +4244,7 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
return;
}
// [/RLVa:KB]
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global));
startTeleportRequest();
}
@@ -4745,6 +4729,16 @@ void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& dire
gMessageSystem->addString("DirectoryVisibility", directory_visibility);
gAgent.sendReliableMessage();
}
void LLAgent::dumpGroupInfo()
{
llinfos << "group " << mGroupName << llendl;
llinfos << "ID " << mGroupID << llendl;
llinfos << "powers " << mGroupPowers << llendl;
llinfos << "title " << mGroupTitle << llendl;
//llinfos << "insig " << mGroupInsigniaID << llendl;
}
// Draw a representation of current autopilot target
void LLAgent::renderAutoPilotTarget()
{
@@ -4990,4 +4984,5 @@ void LLTeleportRequestViaLocationLookAt::restartTeleport()
{
gAgent.doTeleportViaLocationLookAt(getPosGlobal());
}
// EOF

View File

@@ -94,12 +94,13 @@ struct LLGroupData
// forward declarations
//
//------------------------------------------------------------------------
// LLAgent
//------------------------------------------------------------------------
class LLAgent : public LLOldEvents::LLObservable
{
LOG_CLASS(LLAgent);
public:
friend class LLAgentDropGroupViewerNode;
@@ -160,7 +161,7 @@ public:
public:
void getName(std::string& name); //Legacy
void buildFullname(std::string &name) const; //Legacy
// *TODO remove, is not used as of August 20, 2009
//*TODO remove, is not used as of August 20, 2009
void buildFullnameAndTitle(std::string &name) const;
//--------------------------------------------------------------------
@@ -169,11 +170,11 @@ public:
public:
// On the very first login, gender isn't chosen until the user clicks
// in a dialog. We don't render the avatar until they choose.
BOOL isGenderChosen() const { return mGenderChosen; }
void setGenderChosen(BOOL b) { mGenderChosen = b; }
private:
BOOL isGenderChosen() const { return mGenderChosen; }
void setGenderChosen(BOOL b) { mGenderChosen = b; }
private:
BOOL mGenderChosen;
/** Identity
** **
*******************************************************************************/
@@ -182,7 +183,7 @@ public:
** **
** POSITION
**/
//--------------------------------------------------------------------
// Position
//--------------------------------------------------------------------
@@ -215,9 +216,9 @@ public:
void resetAxes();
void resetAxes(const LLVector3 &look_at); // Makes reasonable left and up
// The following three get*Axis functions return direction avatar is looking, not camera.
const LLVector3& getAtAxis() const { return mFrameAgent.getAtAxis(); }
const LLVector3& getUpAxis() const { return mFrameAgent.getUpAxis(); }
const LLVector3& getLeftAxis() const { return mFrameAgent.getLeftAxis(); }
const LLVector3& getAtAxis() const { return mFrameAgent.getAtAxis(); }
const LLVector3& getUpAxis() const { return mFrameAgent.getUpAxis(); }
const LLVector3& getLeftAxis() const { return mFrameAgent.getLeftAxis(); }
LLQuaternion getQuat() const; // Returns the quat that represents the rotation of the agent in the absolute frame
private:
LLVector3d mAgentOriginGlobal; // Origin of agent coords from global coords
@@ -229,7 +230,7 @@ private:
//--------------------------------------------------------------------
public:
void setStartPosition(U32 location_id); // Marks current location as start, sends information to servers
void setHomePosRegion( const U64& region_handle, const LLVector3& pos_region );
void setHomePosRegion(const U64& region_handle, const LLVector3& pos_region);
BOOL getHomePosGlobal(LLVector3d* pos_global);
private:
BOOL mHaveHomePosition;
@@ -277,18 +278,18 @@ public:
private:
std::set<U64> mRegionsVisited; // Stat - what distinct regions has the avatar been to?
F64 mDistanceTraveled; // Stat - how far has the avatar moved?
LLVector3d mLastPositionGlobal; // Used to calculate travel distance
LLVector3d mLastPositionGlobal; // Used to calculate travel distance
/** Position
** **
*******************************************************************************/
/********************************************************************************
** **
** ACTIONS
**/
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Fidget
//--------------------------------------------------------------------
// Trigger random fidget animations
@@ -311,7 +312,7 @@ public:
static void toggleFlying();
static bool enableFlying();
BOOL canFly(); // Does this parcel allow you to fly?
//--------------------------------------------------------------------
// Chat
//--------------------------------------------------------------------
@@ -405,7 +406,7 @@ public:
BOOL getBusy() const;
private:
BOOL mIsBusy;
//--------------------------------------------------------------------
// Grab
//--------------------------------------------------------------------
@@ -443,7 +444,7 @@ private:
//--------------------------------------------------------------------
// Animations
//--------------------------------------------------------------------
//--------------------------------------------------------------------
public:
void stopCurrentAnimations();
void requestStopMotion(LLMotion* motion);
@@ -675,7 +676,7 @@ public:
// ! BACKWARDS COMPATIBILITY ! This function can go away after the AO transition (see llstartup.cpp).
void setAOTransition();
private:
LLAgentAccess *mAgentAccess;
LLAgentAccess * mAgentAccess;
//--------------------------------------------------------------------
// God
@@ -720,7 +721,8 @@ public:
bool isAdult() const;
void setTeen(bool teen);
void setMaturity(char text);
static int convertTextToMaturity(char text);
static int convertTextToMaturity(char text);
private:
bool mIsDoSendMaturityPreferenceToServer;
unsigned int mMaturityPreferenceRequestId;
@@ -743,7 +745,6 @@ private:
bool validateMaturity(const LLSD& newvalue);
/** Access
** **
*******************************************************************************/
@@ -778,20 +779,20 @@ private:
// HUD
//--------------------------------------------------------------------
public:
const LLColor4 &getEffectColor();
void setEffectColor(const LLColor4 &color);
const LLColor4 &getEffectColor();
void setEffectColor(const LLColor4 &color);
private:
LLColor4 *mEffectColor;
/** Rendering
** **
*******************************************************************************/
/********************************************************************************
** **
** GROUPS
**/
public:
const LLUUID &getGroupID() const { return mGroupID; }
// Get group information by group_id, or FALSE if not in group.
@@ -828,7 +829,7 @@ public:
private:
std::string mGroupTitle; // Honorific, like "Sir"
BOOL mHideGroupTitle;
//--------------------------------------------------------------------
// Group Powers
//--------------------------------------------------------------------
@@ -882,15 +883,16 @@ public:
/** Messaging
** **
*******************************************************************************/
*******************************************************************************/
/********************************************************************************
** **
** DEBUGGING
**/
public:
static void clearVisualParams(void *);
void dumpGroupInfo();
static void clearVisualParams(void *);
friend std::ostream& operator<<(std::ostream &s, const LLAgent &sphere);
/** Debugging
@@ -902,7 +904,7 @@ public:
** Phantom mode!
**/
public:
public:
static BOOL getPhantom();
static void setPhantom(BOOL phantom);
static void togglePhantom();

View File

@@ -88,10 +88,6 @@
#include "lltrans.h"
// <edit>
#include "llviewercontrol.h"
// </edit>
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]

View File

@@ -5359,25 +5359,9 @@ std::string LLObjectBridge::getLabelSuffix() const
{
return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn");
}
bool unsupportedPoint = false; //Unsupported points are given special names, translate them as they're named, not later.
std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID);
if (attachment_point_name == LLStringUtil::null) // Error condition, invalid attach point
{
attachment_point_name = "Invalid Attachment";
std::map<S32, std::pair<LLUUID,LLUUID> >::iterator iter = gAgentAvatarp->mUnsupportedAttachmentPoints.begin();
std::map<S32, std::pair<LLUUID,LLUUID> >::iterator end = gAgentAvatarp->mUnsupportedAttachmentPoints.end();
for( ; iter != end; ++iter)
{
if((*iter).second.first == mUUID)
{
attachment_point_name = llformat((LLTrans::getString("unsupported point")+" %d)").c_str(), (*iter).first);
}
}
unsupportedPoint = attachment_point_name != "Invalid Attachment";
}
// e.g. "(worn on ...)" / "(attached to ...)"
LLStringUtil::format_map_t args;
args["[ATTACHMENT_POINT]"] = unsupportedPoint ? attachment_point_name : LLTrans::getString(attachment_point_name);
args["[ATTACHMENT_POINT]"] = LLTrans::getString(gAgentAvatarp->getAttachedPointName(mUUID));
if(gRlvAttachmentLocks.canDetach(getItem()))
return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
@@ -5545,13 +5529,6 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Detach From Yourself"));
// [/RLVa:KB]
}
else
// <edit> testzone attachpt
if( gAgentAvatarp->isWearingUnsupportedAttachment( mUUID ) )
{
items.push_back(std::string("Detach From Yourself"));
}
// </edit>
else if (!isItemInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing() && !isCOFFolder())
{
items.push_back(std::string("Wearable And Object Separator"));

View File

@@ -33,7 +33,6 @@
#ifndef LL_LLVIEWERGESTURE_H
#define LL_LLVIEWERGESTURE_H
#include "llanimationstates.h"
#include "lluuid.h"
#include "llstring.h"
#include "lldarray.h"

File diff suppressed because it is too large Load Diff

View File

@@ -90,7 +90,6 @@ BOOL enable_god_full(void* user_data);
BOOL enable_god_liaison(void* user_data);
BOOL enable_god_customer_service(void* user_data);
BOOL enable_god_basic(void* user_data);
void handle_show_newest_map(void*);
void set_underclothes_menu_options();
void exchange_callingcard(const LLUUID& dest_id);
@@ -98,6 +97,7 @@ void exchange_callingcard(const LLUUID& dest_id);
void handle_gestures(void*);
void handle_sit_down(void*);
void handle_object_build(void*);
bool handle_object_open();
bool visible_take_object();
bool enable_object_take_copy();
@@ -108,6 +108,7 @@ bool enable_object_delete();
void handle_buy();
void handle_take();
void handle_take_copy();
void handle_look_at_selection(const LLSD& param);
void handle_object_return();
void handle_object_delete();
@@ -125,7 +126,6 @@ void handle_fake_away_status(void*);
bool handle_sit_or_stand();
bool handle_give_money_dialog();
bool handle_object_open();
bool enable_buy_object();
bool handle_go_to();

View File

@@ -36,49 +36,31 @@
#include <deque>
#include "llimagejpeg.h"
#include "llagentui.h"
#include "llanimationstates.h"
#include "llaudioengine.h"
#include "llavatarnamecache.h"
#include "indra_constants.h"
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
#include "llfloaterbump.h"
#include "llassetstorage.h"
#include "llcachename.h"
#include "llchat.h"
#include "lldbstrings.h"
#include "lleconomy.h"
#include "llfocusmgr.h"
#include "llfollowcamparams.h"
#include "llinstantmessage.h"
#include "llquantize.h"
#include "llregionflags.h"
#include "llinventorydefines.h"
#include "llregionhandle.h"
#include "llsdserialize.h"
#include "llstring.h"
#include "llteleportflags.h"
#include "lltracker.h"
#include "lltransactionflags.h"
#include "llvfile.h"
#include "llvfs.h"
#include "llxfermanager.h"
#include "mean_collision_data.h"
#include "message.h"
#include "sound_ids.h"
#include "lleventtimer.h"
#include "llmd5.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "llcallingcard.h"
#include "llconsole.h"
#include "llvieweraudio.h"
#include "llviewercontrol.h"
#include "lldrawpool.h"
#include "llfirstuse.h"
#include "llfloateranimpreview.h"
#include "llfloaterbump.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterbuyland.h"
#include "llfloaterchat.h"
@@ -93,16 +75,12 @@
#include "llfloaterpostcard.h"
#include "llfloaterpreference.h"
#include "llfloaterteleporthistory.h"
#include "llfollowcam.h"
#include "llgroupnotify.h"
#include "llhudeffect.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
#include "llimpanel.h"
#include "llinventorydefines.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
#include "llinventorypanel.h"
#include "llmenugl.h"
#include "llmutelist.h"
#include "llnotify.h"
#include "llnotifications.h"
@@ -115,13 +93,7 @@
#include "llstatusbar.h"
#include "llimview.h"
#include "llfloateractivespeakers.h"
#include "lltexturestats.h"
#include "lltool.h"
#include "lltoolbar.h"
#include "lltoolmgr.h"
#include "lltrans.h"
#include "llfoldertype.h"
#include "llui.h" // for make_ui_sound
#include "lluploaddialog.h"
#include "llviewercamera.h"
#include "llviewerdisplay.h"
@@ -140,13 +112,12 @@
#include "llviewerwindow.h"
#include "llvlmanager.h"
#include "llvoavatar.h"
#include "llweb.h"
#include "llworld.h"
#include "pipeline.h"
#include "llappviewer.h"
#include "llfloaterworldmap.h"
#include "llviewerdisplay.h"
#include "llkeythrottle.h"
#include "llagentui.h"
#include "llviewerregion.h"
// <edit>
#include "llviewernetwork.h"
@@ -250,7 +221,7 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
FALSE, // ChangePermissions
FALSE, // TrackYourCamera,
FALSE, // ControlYourCamera
FALSE // TeleportYourAgent
FALSE // TeleportYourAgent
};
bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
@@ -312,9 +283,6 @@ static LLNotificationFunctorRegistration friendship_offer_callback_reg_nm("Offer
void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group,
S32 trx_type, const std::string& desc)
{
// <edit>
//if(!region) return;
// </edit>
if(0 == amount || !region) return;
amount = abs(amount);
LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL;
@@ -1113,7 +1081,9 @@ public:
// If we now try to remove the inventory item, it will cause a nested
// notifyObservers() call, which won't work.
// So defer moving the item to trash until viewer gets idle (in a moment).
LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeItem, &gInventory, mObjectID));
// Use removeObject() rather than removeItem() because at this level,
// the object could be either an item or a folder.
LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeObject, &gInventory, mObjectID));
gInventory.removeObserver(this);
delete this;
}
@@ -1196,12 +1166,12 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
}
}
void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
{
uuid_vec_t::const_iterator it = items.begin();
uuid_vec_t::const_iterator end = items.end();
LLInventoryItem* item;
for(; it != end; ++it)
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)
{
item = gInventory.getItem(*it);
if(!item)
@@ -1270,12 +1240,14 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
return;
}
////////////////////////////////////////////////////////////////////////////////
// Highlight item
//Not sure about this check. Could make it easy to miss incoming items.
//don't dick with highlight while the user is working
//if(inventory_has_focus && !user_is_away)
// break;
LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID() << LL_ENDL;
//highlight item
LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
view->getPanel()->setSelection(item->getUUID(), TAKE_FOCUS_NO);
@@ -1379,7 +1351,7 @@ LLSD LLOfferInfo::asLLSD()
}
bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& response)
{
{
LLChat chat;
std::string log_message;
S32 button = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -1413,8 +1385,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
LLInventoryObserver* opener = NULL;
LLViewerInventoryCategory* catp = NULL;
catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID);
LLViewerInventoryCategory* catp = gInventory.getCategory(mObjectID);
LLViewerInventoryItem* itemp = NULL;
if(!catp)
{
@@ -1905,6 +1876,36 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t
}
}
static std::string clean_name_from_task_im(const std::string& msg,
BOOL from_group)
{
boost::smatch match;
static const boost::regex returned_exp(
"(.*been returned to your inventory lost and found folder by )(.+)( (from|near).*)");
if (boost::regex_match(msg, match, returned_exp))
{
// match objects are 1-based for groups
std::string final = match[1].str();
std::string name = match[2].str();
// Don't try to clean up group names
if (!from_group)
{
if (LLAvatarNameCache::useDisplayNames())
{
// ...just convert to username
final += LLCacheName::buildUsername(name);
}
else
{
// ...strip out legacy "Resident" name
final += LLCacheName::cleanFullName(name);
}
}
final += match[3].str();
return final;
}
return msg;
}
void notification_display_name_callback(const LLUUID& id,
const LLAvatarName& av_name,
@@ -1915,6 +1916,25 @@ void notification_display_name_callback(const LLUUID& id,
substitutions["NAME"] = av_name.mDisplayName;
LLNotificationsUtil::add(name, substitutions, payload);
}
// Callback for name resolution of a god/estate message
void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string message)
{
std::string name;
LLAvatarNameCache::getPNSName(av_name, name);
LLSD args;
args["NAME"] = name;
args["MESSAGE"] = message;
LLNotificationsUtil::add("GodMessage", args);
// Treat like a system message and put in chat history.
chat.mText = name + ": " + message;
// Claim to be from a local agent so it doesn't go into console.
LLFloaterChat::addChat(chat, false, true);
}
void process_improved_im(LLMessageSystem *msg, void **user_data)
{
if (gNoRender)
@@ -1990,6 +2010,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
name = LLTrans::getString("Unnamed");
}
// Preserve the unaltered name for use in group notice mute checking.
std::string original_name = name;
// IDEVO convert new-style "Resident" names for display
name = clean_name_from_im(name, dialog);
@@ -2003,6 +2027,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|| dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id);
BOOL is_linden = LLMuteList::getInstance()->isLinden(name);
BOOL is_owned_by_me = FALSE;
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly");
LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id);
@@ -2274,10 +2300,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// do nothing -- don't distract newbies in
// Prelude with global IMs
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.1.3a) | Modified: RLVa-1.2.0b
else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) )
// [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) &&
(!is_muted) && ((!accept_im_from_only_friend) || (is_friend)) )
{
// TODO-RLVa: [RLVa-1.2.1] Should we send our version string if the other party is muted?
RlvUtil::sendBusyMessage(from_id, RlvStrings::getVersion(), session_id);
// We won't receive a typing stop message, so do that manually (see comment at the end of LLFloaterIMPanel::sendMsg)
LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
@@ -2344,41 +2370,24 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else if (to_id.isNull())
{
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e)
// Filter region messages that weren't sent by a Linden
if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) &&
(!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) )
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
RlvUtil::filterLocation(message);
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
name = RlvStrings::getAnonym(name);
RlvUtil::filterNames(message);
}
}
// [/RLVa:KB]
// Message to everyone from GOD
args["NAME"] = name;
args["MESSAGE"] = message;
LLNotificationsUtil::add("GodMessage", args);
// Treat like a system message and put in chat history.
// Claim to be from a local agent so it doesn't go into
// console.
chat.mText = name + separator_string + message.substr(message_offset);
BOOL local_agent = TRUE;
LLFloaterChat::addChat(chat, FALSE, local_agent);
// Message to everyone from GOD, look up the fullname since
// server always slams name to legacy names
LLAvatarNameCache::get(from_id, boost::bind(god_message_name_cb, _2, chat, message));
}
else
{
// standard message, not from system
bool mute_im = is_muted;
if(accept_im_from_only_friend&&!is_friend)
{
mute_im = true;
}
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
// Don't block offline IMs, or IMs from Lindens
if ( (rlv_handler_t::isEnabled()) && (offline != IM_OFFLINE) && (!is_linden) && (!gRlvHandler.canReceiveIM(from_id)) )
{
if (!is_muted)
if (!mute_im)
RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id);
message = message.substr(0, message_offset) + RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
}
@@ -2391,11 +2400,25 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
args["[LONG_TIMESTAMP]"] = formatted_time(timestamp);
saved = LLTrans::getString("Saved_message", args);
}
buffer = separator_string + saved + message.substr(message_offset);
buffer = separator_string + saved + message.substr(message_offset);
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
if (!is_muted || is_linden)
/*
bool mute_im = is_muted;
if (accept_im_from_only_friend && !is_friend)
{
if (!gIMMgr->isNonFriendSessionNotified(session_id))
{
std::string message = LLTrans::getString("IM_unblock_only_groups_friends");
gIMMgr->addMessage(session_id, from_id, name, message);
gIMMgr->addNotifiedNonFriendSessionID(session_id);
}
mute_im = true;
}
*/
if (!mute_im || is_linden)
{
gIMMgr->addMessage(
session_id,
@@ -2442,9 +2465,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_MESSAGEBOX:
{
// This is a block, modeless dialog.
// *TODO: Translate
//*TODO: Translate
args["MESSAGE"] = message;
LLNotificationsUtil::add("SystemMessage", args);
LLNotificationsUtil::add("SystemMessageTip", args);
}
break;
case IM_GROUP_NOTICE:
@@ -2477,6 +2500,26 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
break;
}
// The group notice packet does not have an AgentID. Obtain one from the name cache.
// If last name is "Resident" strip it out so the cache name lookup works.
U32 index = original_name.find(" Resident");
if (index != std::string::npos)
{
original_name = original_name.substr(0, index);
}
std::string legacy_name = gCacheName->buildLegacyName(original_name);
LLUUID agent_id;
gCacheName->getUUID(legacy_name, agent_id);
if (agent_id.isNull())
{
LL_WARNS("Messaging") << "buildLegacyName returned null while processing " << original_name << LL_ENDL;
}
else if (LLMuteList::getInstance()->isMuted(agent_id))
{
break;
}
notice_bin_bucket = (struct notice_bucket_full_t*) &binary_bucket[0];
U8 has_inventory = notice_bin_bucket->header.has_inventory;
U8 asset_type = notice_bin_bucket->header.asset_type;
@@ -2549,27 +2592,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
break;
case IM_GROUP_INVITATION:
{
// Read the binary bucket for more information.
struct invite_bucket_t
{
S32 membership_fee;
LLUUID role_id;
}* invite_bucket;
// Make sure the binary bucket is the correct size.
if (binary_bucket_size != sizeof(invite_bucket_t))
{
LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL;
break;
}
invite_bucket = (struct invite_bucket_t*) &binary_bucket[0];
S32 membership_fee = ntohl(invite_bucket->membership_fee);
// NaCl - Antispam
if(antispam || gSavedSettings.getBOOL("AntiSpamGroupInvites") || (membership_fee > 0 && gSavedSettings.getBOOL("AntiSpamGroupFeeInvites")))
if (antispam || gSavedSettings.getBOOL("AntiSpamGroupInvites"))
return;
// NaCl End
//if (!is_linden && (is_busy || is_muted))
if ((is_busy || is_muted))
{
@@ -2579,6 +2606,26 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
else
{
LL_INFOS("Messaging") << "Received IM_GROUP_INVITATION message." << LL_ENDL;
// Read the binary bucket for more information.
struct invite_bucket_t
{
S32 membership_fee;
LLUUID role_id;
}* invite_bucket;
// Make sure the binary bucket is the correct size.
if (binary_bucket_size != sizeof(invite_bucket_t))
{
LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL;
break;
}
invite_bucket = (struct invite_bucket_t*) &binary_bucket[0];
S32 membership_fee = ntohl(invite_bucket->membership_fee);
// NaCl - Antispam
if (membership_fee > 0 && gSavedSettings.getBOOL("AntiSpamGroupFeeInvites"))
return;
// NaCl End
LLSD payload;
payload["transaction_id"] = session_id;
@@ -2680,23 +2727,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
// args["NAME"] = name;
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
(RlvUtil::isNearbyAgent(from_id)) && (!LLFloaterAvatarInfo::getInstance(from_id));
args["NAME"] = (!fRlvObfuscate) ? name : RlvStrings::getAnonym(name);
bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
(!LLFloaterAvatarInfo::getInstance(from_id));
args["NAME"] = (!fRlvFilterName) ? name : RlvStrings::getAnonym(name);
// [/RLVa:KB]
//args["NAME"] = name;
LLNotificationsUtil::add("InventoryAccepted", args);
break;
}
case IM_INVENTORY_DECLINED:
{
// args["NAME"] = name;
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
(RlvUtil::isNearbyAgent(from_id)) && (!LLFloaterAvatarInfo::getInstance(from_id));
args["NAME"] = (!fRlvObfuscate) ? name : RlvStrings::getAnonym(name);
bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
(!LLFloaterAvatarInfo::getInstance(from_id));
args["NAME"] = (!fRlvFilterName) ? name : RlvStrings::getAnonym(name);
// [/RLVa:KB]
//args["NAME"] = name;
LLNotificationsUtil::add("InventoryDeclined", args);
break;
}
@@ -2764,11 +2811,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
}
buffer = separator_string + saved + message.substr(message_offset);
BOOL is_this_agent = FALSE;
if(from_id == gAgentID)
{
is_this_agent = TRUE;
}
gIMMgr->addMessage(
session_id,
from_id,
@@ -2793,7 +2835,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
prepend_msg = std::string("IM: ");
}
chat.mText = prepend_msg + name + separator_string + saved + message.substr(message_offset);
LLFloaterChat::addChat(chat, TRUE, is_this_agent);
LLFloaterChat::addChat(chat, TRUE, from_id == gAgentID);
}
break;
@@ -2832,6 +2874,22 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
chat.mFromID = from_id ^ gAgent.getSessionID();
}
chat.mSourceType = CHAT_SOURCE_OBJECT;
// To conclude that the source type of message is CHAT_SOURCE_SYSTEM it's not
// enough to check only from name (i.e. fromName = "Second Life"). For example
// source type of messages from objects called "Second Life" should not be CHAT_SOURCE_SYSTEM.
bool chat_from_system = (SYSTEM_FROM == name) && region_id.isNull() && position.isNull();
if(chat_from_system)
{
// System's UUID is NULL (fixes EXT-4766)
chat.mFromID = LLUUID::null;
chat.mSourceType = CHAT_SOURCE_SYSTEM;
}
// IDEVO Some messages have embedded resident names
message = clean_name_from_task_im(message, from_group);
std::ostringstream link;
link << "secondlife:///app/objectim/" << session_id
<< LLURI::mapToQueryString(query_string);
@@ -2841,7 +2899,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
// IMs from objcts don't open IM sessions.
chat.mSourceType = CHAT_SOURCE_OBJECT;
LLFloaterChat::addChat(chat, FALSE, FALSE);
}
break;
@@ -3463,12 +3520,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// if (chat.mSourceType == CHAT_SOURCE_OBJECT
// && chat.mChatType != CHAT_TYPE_DEBUG_MSG
// && gSavedSettings.getBOOL("EffectScriptChatParticles") )
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
// Don't show swirly things for llOwnerSay() chat here because we handle those further down
// RELEASE-RLVa: if this code changes, remember to change the code down below as well
if ( (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) &&
(CHAT_TYPE_OWNER != chat.mChatType) )
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0b) | Modified: RLVa-1.0.0g
if ( ((chat.mSourceType == CHAT_SOURCE_OBJECT) && (chat.mChatType != CHAT_TYPE_DEBUG_MSG)) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) &&
((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) )
// [/RLVa:KB]
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
@@ -3822,11 +3877,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
if(SHCommandHandler::handleCommand(false,mesg,from_id,chatter))
return;
#endif //shy_mod
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0b) | Modified: RLVa-1.0.0g
// Copy/paste from above
if ( chatter && (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) &&
(CHAT_TYPE_OWNER != chat.mChatType) )
if ( (rlv_handler_t::isEnabled()) && (chatter) && (chat.mSourceType == CHAT_SOURCE_OBJECT) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
@@ -3838,8 +3892,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
// [/RLVa:KB]
case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_DIRECT: // llRegionSayTo()
case CHAT_TYPE_NORMAL:
case CHAT_TYPE_DIRECT:
verb = ": ";
break;
case CHAT_TYPE_SHOUT:
@@ -3890,8 +3944,8 @@ void process_teleport_start(LLMessageSystem *msg, void**)
LL_DEBUGS("Messaging") << "Got TeleportStart with TeleportFlags=" << teleport_flags << ". gTeleportDisplay: " << gTeleportDisplay << ", gAgent.mTeleportState: " << gAgent.getTeleportState() << LL_ENDL;
//if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Added: RLVa-0.2.0b
if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) )
// [/RLVa:KB]
{
@@ -3930,8 +3984,8 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
}
U32 teleport_flags = 0x0;
msg->getU32("Info", "TeleportFlags", teleport_flags);
//if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Added: RLVa-0.2.0b
if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) )
// [/RLVa:KB]
{
@@ -4132,7 +4186,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
gAgent.setRegion(regionp);
gObjectList.shiftObjects(shift_vector);
if (gAgentAvatarp)
if (isAgentAvatarValid())
{
gAgentAvatarp->clearChatText();
gAgentCamera.slamLookAt(look_at);
@@ -4538,6 +4592,8 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
head_rot_chg = dot(last_head_rot, head_rotation);
//static S32 msg_number = 0; // Used for diagnostic log messages
if (force_send ||
(cam_center_chg.magVec() > TRANSLATE_THRESHOLD) ||
(head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) ||
@@ -4546,19 +4602,20 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
control_flag_change != 0 ||
flag_change != 0)
{
/*
/* Diagnotics to show why we send the AgentUpdate message. Also un-commment the msg_number code above and below this block
msg_number += 1;
if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT)
{
//LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL;
LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL;
LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", head_rot_chg " << head_rot_chg << LL_ENDL;
}
if (cam_rot_chg.magVec() > ROTATION_THRESHOLD)
{
LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL;
LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", cam rot " << cam_rot_chg.magVec() << LL_ENDL;
}
if (cam_center_chg.magVec() > TRANSLATE_THRESHOLD)
{
LL_INFOS("Messaging") << "cam center " << cam_center_chg.magVec() << LL_ENDL;
LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", cam center " << cam_center_chg.magVec() << LL_ENDL;
}
// if (drag_delta_chg.magVec() > TRANSLATE_THRESHOLD)
// {
@@ -4566,9 +4623,9 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// }
if (control_flag_change)
{
LL_INFOS("Messaging") << "dcf = " << control_flag_change << LL_ENDL;
LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", dcf = " << control_flag_change << LL_ENDL;
}
*/
*/
duplicate_count = 0;
}
@@ -4603,6 +4660,26 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
if (duplicate_count < DUP_MSGS && !gDisconnected)
{
/* More diagnostics to count AgentUpdate messages
static S32 update_sec = 0;
static S32 update_count = 0;
static S32 max_update_count = 0;
S32 cur_sec = lltrunc( LLTimer::getTotalSeconds() );
update_count += 1;
if (cur_sec != update_sec)
{
if (update_sec != 0)
{
update_sec = cur_sec;
//msg_number = 0;
max_update_count = llmax(max_update_count, update_count);
llinfos << "Sent " << update_count << " AgentUpdate messages per second, max is " << max_update_count << llendl;
}
update_sec = cur_sec;
update_count = 0;
}
*/
LLFastTimer t(FTM_AGENT_UPDATE_SEND);
// Build the message
msg->newMessageFast(_PREHASH_AgentUpdate);
@@ -4820,8 +4897,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
//LL_DEBUGS("Messaging") << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
// << ", " << phase << LL_ENDL;
LL_DEBUGS("Windlight Sync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
gSky.setSunPhase(phase);
gSky.setSunTargetDirection(sun_direction, sun_ang_velocity);
@@ -5712,17 +5788,17 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
return;
}
// Once the 'recent' container gets large enough, chop some
// off the beginning.
const U32 MAX_LOOKBACK = 30;
const S32 POP_FRONT_SIZE = 12;
if(recent.size() > MAX_LOOKBACK)
{
LL_DEBUGS("Messaging") << "Removing oldest transaction records" << LL_ENDL;
recent.erase(recent.begin(), recent.begin() + POP_FRONT_SIZE);
}
//LL_DEBUGS("Messaging") << "Pushing back transaction " << tid << LL_ENDL;
recent.push_back(tid);
// Once the 'recent' container gets large enough, chop some
// off the beginning.
const U32 MAX_LOOKBACK = 30;
const S32 POP_FRONT_SIZE = 12;
if(recent.size() > MAX_LOOKBACK)
{
LL_DEBUGS("Messaging") << "Removing oldest transaction records" << LL_ENDL;
recent.erase(recent.begin(), recent.begin() + POP_FRONT_SIZE);
}
//LL_DEBUGS("Messaging") << "Pushing back transaction " << tid << LL_ENDL;
recent.push_back(tid);
if (msg->has("TransactionInfo"))
{
@@ -5945,14 +6021,14 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
bool handle_prompt_for_maturity_level_change_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
// set the preference to the maturity of the region we're calling
U8 preferredMaturity = static_cast<U8>(notification["payload"]["_region_access"].asInteger());
gSavedSettings.setU32("PreferredMaturity", static_cast<U32>(preferredMaturity));
}
return false;
}

File diff suppressed because it is too large Load Diff

View File

@@ -931,8 +931,6 @@ F32 LLVOAvatar::sLODFactor = 1.f;
F32 LLVOAvatar::sPhysicsLODFactor = 1.f;
BOOL LLVOAvatar::sUseImpostors = FALSE;
BOOL LLVOAvatar::sJointDebug = FALSE;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
F32 LLVOAvatar::sGreyTime = 0.f;
@@ -2480,13 +2478,6 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
LLJoint::sNumUpdates = 0;
LLJoint::sNumTouches = 0;
/*// *NOTE: this is necessary for the floating name text above your head.
// NOTE NOTE: This doesn't seem to be needed any more?
if (mDrawable && mDrawable.notNull())
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_SHADOW, TRUE);
}*/
BOOL visible = isVisible() || mNeedsAnimUpdate;
// update attachments positions
@@ -2929,7 +2920,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
}
return;
}
if (!mNameText)
{
mNameText = static_cast<LLHUDNameTag*>( LLHUDObject::addHUDObject(
@@ -4936,31 +4927,6 @@ void LLVOAvatar::updateTextures()
}
}
/*
// JAMESDEBUG
if (isSelf())
{
S32 null_count = 0;
S32 default_count = 0;
for (U32 i = 0; i < getNumTEs(); i++)
{
const LLTextureEntry* te = getTE(i);
if (te)
{
if (te->getID() == LLUUID::null)
{
null_count++;
}
else if (te->getID() == IMG_DEFAULT_AVATAR)
{
default_count++;
}
}
}
llinfos << "JAMESDEBUG my avatar TE null " << null_count << " default " << default_count << llendl;
}
*/
mMaxPixelArea = 0.f;
mMinPixelArea = 99999999.f;
mHasGrey = FALSE; // debug
@@ -5237,10 +5203,7 @@ const LLUUID& LLVOAvatar::getStepSound() const
//-----------------------------------------------------------------------------
void LLVOAvatar::processAnimationStateChanges()
{
if ((gNoRender)||(gAgent.isTPosed())) //isTPosed is meant to stop animation updates while force-TPosed.
{
return;
}
if (gNoRender) return;
if ( isAnyAnimationSignaled(AGENT_WALK_ANIMS, NUM_AGENT_WALK_ANIMS) )
{
@@ -6188,32 +6151,6 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
{
LLViewerJointAttachment* attachment = getTargetAttachmentPoint(viewer_object);
// <edit> testzone attachpt
if(!attachment)
{
llwarns << "Failed to find attachment." << llendl;
S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getState());
LLUUID item_id;
LLNameValue* item_id_nv = viewer_object->getNVPair("AttachItemID");
if( item_id_nv )
{
const char* s = item_id_nv->getString();
if(s)
item_id.set(s);
}
if(!item_id.isNull())
{
mUnsupportedAttachmentPoints[attachmentID] = std::pair<LLUUID,LLUUID>(item_id,viewer_object->getID());
if (viewer_object->isSelected())
{
LLSelectMgr::getInstance()->updateSelectionCenter();
LLSelectMgr::getInstance()->updatePointAt();
}
}
else
llwarns << "No item ID" << llendl;
}
// </edit>
if (!attachment || !attachment->addObject(viewer_object))
{
return 0;
@@ -6390,57 +6327,6 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
mPendingAttachment.erase(iter);
return TRUE;
}
// <edit> testzone attachpt
LLUUID item_id;
LLNameValue* item_id_nv = viewer_object->getNVPair("AttachItemID");
if( item_id_nv )
{
const char* s = item_id_nv->getString();
if(s)
item_id.set(s);
}
if(!item_id.isNull())
{
std::map<S32, std::pair<LLUUID,LLUUID> >::iterator iter = mUnsupportedAttachmentPoints.begin();
std::map<S32, std::pair<LLUUID,LLUUID> >::iterator end = mUnsupportedAttachmentPoints.end();
for( ; iter != end; ++iter)
{
if((*iter).second.first == item_id)
{
mUnsupportedAttachmentPoints.erase((*iter).first);
if (isSelf())
{
// the simulator should automatically handle
// permission revocation
stopMotionFromSource(viewer_object->getID());
LLFollowCamMgr::setCameraActive(viewer_object->getID(), FALSE);
LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* child_objectp = *iter;
// the simulator should automatically handle
// permissions revocation
stopMotionFromSource(child_objectp->getID());
LLFollowCamMgr::setCameraActive(child_objectp->getID(), FALSE);
}
// Then make sure the inventory is in sync with the avatar.
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
gInventory.notifyObservers();
}
return TRUE;
}
}
llwarns << "Not found" << llendl;
}
else
llwarns << "No item ID" << llendl;
// </edit>
return FALSE;
}
@@ -6684,19 +6570,6 @@ BOOL LLVOAvatar::isWearingAttachment( const LLUUID& inv_item_id )
return FALSE;
}
// <edit> testzone attachpt
BOOL LLVOAvatar::isWearingUnsupportedAttachment( const LLUUID& inv_item_id )
{
std::map<S32, std::pair<LLUUID,LLUUID> >::iterator end = mUnsupportedAttachmentPoints.end();
for(std::map<S32, std::pair<LLUUID,LLUUID> >::iterator iter = mUnsupportedAttachmentPoints.begin(); iter != end; ++iter)
{
if((*iter).second.first == inv_item_id)
{
return TRUE;
}
}
return FALSE;
}
//-----------------------------------------------------------------------------
// getWornAttachment()
//-----------------------------------------------------------------------------
@@ -6733,6 +6606,7 @@ const std::string LLVOAvatar::getAttachedPointName(const LLUUID& inv_item_id)
return LLStringUtil::null;
}
// virtual
void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result )
{
}

View File

@@ -336,7 +336,6 @@ public:
S32 mLastRezzedStatus;
void startPhase(const std::string& phase_name);
void stopPhase(const std::string& phase_name, bool err_check = true);
void clearPhases();
@@ -371,6 +370,7 @@ protected:
/** State
** **
*******************************************************************************/
/********************************************************************************
** **
** SKELETON
@@ -767,17 +767,10 @@ protected:
//--------------------------------------------------------------------
public:
BOOL isWearingAttachment( const LLUUID& inv_item_id );
// <edit> testzone attachpt
BOOL isWearingUnsupportedAttachment( const LLUUID& inv_item_id );
// </edit>
LLViewerObject* getWornAttachment( const LLUUID& inv_item_id );
const std::string getAttachedPointName(const LLUUID& inv_item_id);
// <edit>
std::map<S32, std::pair<LLUUID/*inv*/,LLUUID/*object*/> > mUnsupportedAttachmentPoints;
// </edit>
/** Wearables
** **
*******************************************************************************/

View File

@@ -69,6 +69,7 @@
<string name="ShuttingDown">Shutting down...</string>
<string name="YouHaveBeenDisconnected">You have been disconnected from the region you were in.</string>
<string name="SentToInvalidRegion">You were sent to an invalid region.</string>
<string name="TestingDisconnect">Testing viewer disconnect</string>
<!-- Tooltip, llhoverview.cpp -->
<string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar -->
@@ -3101,7 +3102,6 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
<string name="Right Pec">Right Pec</string>
<string name="Neck">Neck</string>
<string name="Root">Root</string>
<string name="unsupported point">unsupported point</string>
<string name="Invalid Attachment">Invalid Attachment Point</string>
<!-- HUD Position -->
@@ -3266,6 +3266,7 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
<string name="AcquiredItems">Acquired Items</string>
<string name="Cancel">Cancel</string>
<string name="UploadingCosts">Uploading [NAME] costs [CURRENCY] [AMOUNT]</string>
<string name="BuyingCosts">Buying this costs</string>
<string name="UnknownFileExtension">
Unknown file extension .%s
Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh
@@ -3955,6 +3956,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Unnamed">(Unnamed)</string>
<string name="inventory_item_offered_to">Inventory item offered to</string>
<string name="Saved_message" value="(Saved [LONG_TIMESTAMP]) "/>
<string name="StartPointSet">Start point set</string>
<string name="EndPointSet">End point set</string>
<string name="MeasuredDistance">Distance: [DIST]</string>
<string name="PowerUser1">You are bestowed with powers beyond mortal comprehension.</string>
<string name="PowerUser2">Use your newfound abilities wisely.</string>
<string name="Unlocked:">Unlocked:</string>
@@ -4084,6 +4088,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="giving">Giving [CURRENCY]</string>
<string name="this_costs">This costs [CURRENCY]</string>
<string name="this_object_costs">This object costs</string>
<string name="group_role_everyone">Everyone</string>
<string name="group_role_officers">Officers</string>
@@ -4130,6 +4135,15 @@ Try enclosing path to the editor with double quotes.
<string name="Left">Left</string>
<string name="Right">Right</string>
<!-- llviewerwindow -->
<string name="BeaconParticle">Viewing particle beacons (blue)</string>
<string name="BeaconPhysical">Viewing physical object beacons (green)</string>
<string name="BeaconScripted">Viewing scripted object beacons (red)</string>
<string name="BeaconScriptedTouch">Viewing scripted object with touch function beacons (red)</string>
<string name="BeaconSound">Viewing sound beacons (yellow)</string>
<string name="BeaconMedia">Viewing media beacons (white)</string>
<string name="ParticleHiding">Hiding Particles</string>
<!-- Pathfinding -->
<string name="Pathfinding_Wiki_URL">http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer</string>
<string name="Pathfinding_Object_Attr_None">None</string>

View File

@@ -2967,7 +2967,6 @@ Arrastra carpetas a esta zona y pulsa "Enviar al Mercado" para listarlos y poner
<string name="Right Pec">Pectoral Derecho</string>
<string name="Neck">Cuello</string>
<string name="Root">Base</string>
<string name="unsupported point">Punto no soportado</string>
<string name="Invalid Attachment">Punto de anexión inválido</string>
<!-- HUD Position -->