aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-08 09:00:18 -0700
committerMcCabe Maxsted2009-06-08 09:00:18 -0700
commit51b0a9e05afa2254db4cf7abe4429387d5c89574 (patch)
treea443fa13def0076b708f9baf7c7398c354a4d3c9
parentRestored zlib1.dll (not a bad entry) (diff)
parentBackported fix from 1.23 for stop animations only being local (VWR-2850) (diff)
downloadmeta-impy-51b0a9e05afa2254db4cf7abe4429387d5c89574.zip
meta-impy-51b0a9e05afa2254db4cf7abe4429387d5c89574.tar.gz
meta-impy-51b0a9e05afa2254db4cf7abe4429387d5c89574.tar.bz2
meta-impy-51b0a9e05afa2254db4cf7abe4429387d5c89574.tar.xz
Merged in 1.2.0-stopallanims
-rw-r--r--ChangeLog.txt12
-rw-r--r--linden/indra/newview/llagent.cpp51
-rw-r--r--linden/indra/newview/llagent.h1
-rw-r--r--linden/indra/newview/llviewermenu.cpp7
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml4
5 files changed, 57 insertions, 18 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 91b3226..a234c5f 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -40,6 +40,18 @@
40 40
41 modified: linden/indra/cmake/CopyWinLibs.cmake 41 modified: linden/indra/cmake/CopyWinLibs.cmake
42 modified: linden/install.xml 42 modified: linden/install.xml
43
44
452009-04-22 McCabe Maxsted <hakushakukun@gmail.com>
46
47 * linden/indra/newview/llagent.cpp:
48 Backported fix from 1.23 for stop animations only being local (VWR-2850).
49 * linden/indra/newview/llagent.h:
50 Ditto.
51 * linden/indra/newview/llviewermenu.cpp:
52 Ditto.
53 * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml:
54 Ditto.
43 55
44 56
45=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 57=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index 6fe4863..89ba09c 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -5822,18 +5822,13 @@ bool LLAgent::teleportCore(bool is_local)
5822 return false; 5822 return false;
5823 } 5823 }
5824 5824
5825 // Stop all animation before actual teleporting 5825 // Cease sitting on the current object, if any.
5826 LLVOAvatar* avatarp = gAgent.getAvatarObject(); 5826 LLVOAvatar* avatarp = gAgent.getAvatarObject();
5827 if (avatarp) 5827 if (avatarp)
5828 { 5828 avatarp->getOffObject();
5829 for ( LLVOAvatar::AnimIterator anim_it= avatarp->mPlayingAnimations.begin() 5829
5830 ; anim_it != avatarp->mPlayingAnimations.end() 5830 // Stop all animations before actual teleporting
5831 ; anim_it++) 5831 stopCurrentAnimations();
5832 {
5833 avatarp->stopMotion(anim_it->first);
5834 }
5835 avatarp->processAnimationStateChanges();
5836 }
5837 5832
5838 // Don't call LLFirstUse::useTeleport because we don't know 5833 // Don't call LLFirstUse::useTeleport because we don't know
5839 // yet if the teleport will succeed. Look in 5834 // yet if the teleport will succeed. Look in
@@ -6034,6 +6029,42 @@ void LLAgent::setTeleportState(ETeleportState state)
6034 } 6029 }
6035} 6030}
6036 6031
6032void LLAgent::stopCurrentAnimations()
6033{
6034 // This function stops all current overriding animations on this
6035 // avatar, propagating this change back to the server.
6036
6037 LLVOAvatar* avatarp = gAgent.getAvatarObject();
6038 if (avatarp)
6039 {
6040 for ( LLVOAvatar::AnimIterator anim_it =
6041 avatarp->mPlayingAnimations.begin();
6042 anim_it != avatarp->mPlayingAnimations.end();
6043 anim_it++)
6044 {
6045 if (anim_it->first ==
6046 ANIM_AGENT_SIT_GROUND_CONSTRAINED)
6047 {
6048 // don't cancel a ground-sit anim, as viewers
6049 // use this animation's status in
6050 // determining whether we're sitting. ick.
6051 }
6052 else
6053 {
6054 // stop this animation locally
6055 avatarp->stopMotion(anim_it->first, TRUE);
6056 // ...and tell the server to tell everyone.
6057 sendAnimationRequest(anim_it->first, ANIM_REQUEST_STOP);
6058 }
6059 }
6060
6061 // re-assert at least the default standing animation, because
6062 // viewers get confused by avs with no associated anims.
6063 sendAnimationRequest(ANIM_AGENT_STAND,
6064 ANIM_REQUEST_START);
6065 }
6066}
6067
6037void LLAgent::fidget() 6068void LLAgent::fidget()
6038{ 6069{
6039 if (!getAFK()) 6070 if (!getAFK())
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h
index 7515781..a4a930f 100644
--- a/linden/indra/newview/llagent.h
+++ b/linden/indra/newview/llagent.h
@@ -372,6 +372,7 @@ public:
372 BOOL canFly(); 372 BOOL canFly();
373 373
374 // Animation functions 374 // Animation functions
375 void stopCurrentAnimations();
375 void requestStopMotion( LLMotion* motion ); 376 void requestStopMotion( LLMotion* motion );
376 void onAnimStop(const LLUUID& id); 377 void onAnimStop(const LLUUID& id);
377 378
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 9374a36..aa5e791 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -4211,12 +4211,7 @@ class LLToolsStopAllAnimations : public view_listener_t
4211{ 4211{
4212 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4212 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4213 { 4213 {
4214 LLVOAvatar* avatarp = gAgent.getAvatarObject(); 4214 gAgent.stopCurrentAnimations();
4215 if (avatarp)
4216 {
4217 avatarp->deactivateAllMotions();
4218 avatarp->startDefaultMotions();
4219 }
4220 return true; 4215 return true;
4221 } 4216 }
4222}; 4217};
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 6c88b83..72b828d 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -445,8 +445,8 @@
445 <menu_item_call name="Set Busy" label="Set Busy"> 445 <menu_item_call name="Set Busy" label="Set Busy">
446 <on_click function="World.SetBusy" userdata="" /> 446 <on_click function="World.SetBusy" userdata="" />
447 </menu_item_call> 447 </menu_item_call>
448 <menu_item_call name="Stop All Animations" enabled="false" 448 <menu_item_call name="Stop Animating My Avatar" enabled="false"
449 label="Stop All Animations"> 449 label="Stop Animating My Avatar">
450 <on_click function="Tools.StopAllAnimations" userdata="" /> 450 <on_click function="Tools.StopAllAnimations" userdata="" />
451 </menu_item_call> 451 </menu_item_call>
452 <menu_item_call name="Release Keys" enabled="false" label="Release Keys"> 452 <menu_item_call name="Release Keys" enabled="false" label="Release Keys">