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

@@ -38,6 +38,7 @@
#include <deque>
#include "llimagejpeg.h"
#include "llanimationstates.h"
#include "llaudioengine.h"
#include "llavatarnamecache.h"
#include "indra_constants.h"
@@ -361,9 +362,9 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
S32 trx_type, const std::string& desc)
{
// <edit>
//if(0 == amount || !region) return;
if(!region) return;
//if(!region) return;
// </edit>
if(0 == amount || !region) return;
amount = abs(amount);
LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL;
if(can_afford_transaction(amount))
@@ -4820,6 +4821,17 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
// *HACK: Disabling flying mode if it has been enabled shortly before the agent
// stand up animation is signaled. In this case we don't get a signal to start
// flying animation from server, the AGENT_CONTROL_FLY flag remains set but the
// avatar does not play flying animation, so we switch flying mode off.
// See LLAgent::setFlying(). This may cause "Stop Flying" button to blink.
// See EXT-2781.
if (animation_id == ANIM_AGENT_STANDUP && gAgent.getFlying())
{
gAgent.setFlying(FALSE);
}
if (i < num_source_blocks)
{
mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i);
@@ -4926,6 +4938,9 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
}
gAgentCamera.setForceMouselook(force_mouselook);
// Forcing turning off flying here to prevent flying after pressing "Stand"
// to stand up from an object. See EXT-1655.
gAgent.setFlying(FALSE);
LLViewerObject* object = gObjectList.findObject(sitObjectID);
if (object)
@@ -5317,7 +5332,7 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
bool attempt_standard_notification(LLMessageSystem* msgsystem)
{
// if we have additional alert data
if (msgsystem->getNumberOfBlocksFast(_PREHASH_AlertInfo) > 0)
if (msgsystem->has(_PREHASH_AlertInfo) && msgsystem->getNumberOfBlocksFast(_PREHASH_AlertInfo) > 0)
{
// notification was specified using the new mechanism, so we can just handle it here
std::string notificationID;
@@ -5423,7 +5438,7 @@ void process_alert_core(const std::string& message, BOOL modal)
std::string snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_HOME_FILENAME;
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, FALSE);
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
}
const std::string ALERT_PREFIX("ALERT: ");
@@ -6044,7 +6059,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
LLSD args;
// if we have additional alert data
if (msg->getNumberOfBlocksFast(_PREHASH_AlertInfo) > 0)
if (msg->has(_PREHASH_AlertInfo) && msg->getSizeFast(_PREHASH_AlertInfo, _PREHASH_Message) > 0)
{
// Get the message ID
msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, reason);
@@ -6462,7 +6477,14 @@ void process_script_dialog(LLMessageSystem* msg, void**)
LLUUID object_id;
msg->getUUID("Data", "ObjectID", object_id);
if (LLMuteList::getInstance()->isMuted(object_id))
// For compability with OS grids first check for presence of extended packet before fetching data.
LLUUID owner_id;
if (gMessageSystem->getNumberOfBlocks("OwnerData") > 0)
{
msg->getUUID("OwnerData", "OwnerID", owner_id);
}
if (LLMuteList::getInstance()->isMuted(object_id) || LLMuteList::getInstance()->isMuted(owner_id))
{
return;
}