From 383cb255e0ff619fa4ee3fc0b1dc6a37643d3bc1 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 29 Dec 2009 20:47:11 +0200 Subject: Fixed low bug (EXT-2781) Stop Flying button is displayed while walking after slumping. - Disabled 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 because of some server side problem, the agent's avatar does not play flying animation, so we switch flying mode off. This may cause "Stop Flying" button to blink. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 87045d2abf..f9f778449b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llviewermessage.h" +#include "llanimationstates.h" #include "llaudioengine.h" #include "lscript_byteformat.h" #include "lleconomy.h" @@ -3941,6 +3942,16 @@ 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. + 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); -- cgit v1.2.3 From 8f30d5f20413eac9356a84647dfb051cc02e3ba3 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 30 Dec 2009 14:38:22 +0200 Subject: EXT-2781. Added reference to issue in comments. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f9f778449b..ed138f24ca 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3947,6 +3947,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) // 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); -- cgit v1.2.3 From 3a50996058b3892fccb0196db23f8c36d5573b70 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 30 Dec 2009 14:50:57 +0200 Subject: Fixed normal bug EXT-3643 - Make Friend Offer dialog a modal alert. Added "Start IM" option to "OfferFriendship" notification. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ed138f24ca..6f9e551649 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -35,6 +35,7 @@ #include "llanimationstates.h" #include "llaudioengine.h" +#include "llavataractions.h" #include "lscript_byteformat.h" #include "lleconomy.h" #include "llfloaterreg.h" @@ -193,19 +194,25 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) msg->sendReliable(LLHost(payload["sender"].asString())); break; } - case 1: - { - // decline - // We no longer notify other viewers, but we DO still send - // the rejection to the simulator to delete the pending userop. - msg->newMessageFast(_PREHASH_DeclineFriendship); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_TransactionBlock); - msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); - msg->sendReliable(LLHost(payload["sender"].asString())); - break; + case 1: // Decline + case 2: // Send IM - decline and start IM session + { + // decline + // We no longer notify other viewers, but we DO still send + // the rejection to the simulator to delete the pending userop. + msg->newMessageFast(_PREHASH_DeclineFriendship); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_TransactionBlock); + msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]); + msg->sendReliable(LLHost(payload["sender"].asString())); + + // start IM session + if(2 == option) + { + LLAvatarActions::startIM(payload["from_id"].asUUID()); + } } default: // close button probably, possibly timed out -- cgit v1.2.3