diff options
Diffstat (limited to '')
3 files changed, 53 insertions, 27 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 258683d..9895402 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -346,7 +346,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
346 | /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock | 346 | /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock |
347 | /// | 347 | /// |
348 | /// </value> | 348 | /// </value> |
349 | protected HashSet<uint> m_killRecord; | 349 | // protected HashSet<uint> m_killRecord; |
350 | 350 | ||
351 | // protected HashSet<uint> m_attachmentsSent; | 351 | // protected HashSet<uint> m_attachmentsSent; |
352 | 352 | ||
@@ -472,7 +472,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
472 | m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); | 472 | m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); |
473 | m_entityProps = new PriorityQueue(m_scene.Entities.Count); | 473 | m_entityProps = new PriorityQueue(m_scene.Entities.Count); |
474 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | 474 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); |
475 | m_killRecord = new HashSet<uint>(); | 475 | // m_killRecord = new HashSet<uint>(); |
476 | // m_attachmentsSent = new HashSet<uint>(); | 476 | // m_attachmentsSent = new HashSet<uint>(); |
477 | 477 | ||
478 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 478 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
@@ -1574,17 +1574,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1574 | // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race | 1574 | // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race |
1575 | // condition where a kill can be processed before an out-of-date update for the same object. | 1575 | // condition where a kill can be processed before an out-of-date update for the same object. |
1576 | // ProcessEntityUpdates() also takes the m_killRecord lock. | 1576 | // ProcessEntityUpdates() also takes the m_killRecord lock. |
1577 | lock (m_killRecord) | 1577 | // lock (m_killRecord) |
1578 | { | 1578 | // { |
1579 | foreach (uint localID in localIDs) | 1579 | // foreach (uint localID in localIDs) |
1580 | m_killRecord.Add(localID); | 1580 | // m_killRecord.Add(localID); |
1581 | 1581 | ||
1582 | // The throttle queue used here must match that being used for updates. Otherwise, there is a | 1582 | // The throttle queue used here must match that being used for updates. Otherwise, there is a |
1583 | // chance that a kill packet put on a separate queue will be sent to the client before an existing | 1583 | // chance that a kill packet put on a separate queue will be sent to the client before an existing |
1584 | // update packet on another queue. Receiving updates after kills results in unowned and undeletable | 1584 | // update packet on another queue. Receiving updates after kills results in unowned and undeletable |
1585 | // scene objects in a viewer until that viewer is relogged in. | 1585 | // scene objects in a viewer until that viewer is relogged in. |
1586 | OutPacket(kill, ThrottleOutPacketType.Task); | 1586 | OutPacket(kill, ThrottleOutPacketType.Task); |
1587 | } | 1587 | // } |
1588 | } | 1588 | } |
1589 | } | 1589 | } |
1590 | 1590 | ||
@@ -3802,11 +3802,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3802 | // If the object is an attachment we don't want it to be in the kill | 3802 | // If the object is an attachment we don't want it to be in the kill |
3803 | // record. Else attaching from inworld and subsequently dropping | 3803 | // record. Else attaching from inworld and subsequently dropping |
3804 | // it will no longer work. | 3804 | // it will no longer work. |
3805 | lock (m_killRecord) | 3805 | // lock (m_killRecord) |
3806 | { | 3806 | // { |
3807 | m_killRecord.Remove(part.LocalId); | 3807 | // m_killRecord.Remove(part.LocalId); |
3808 | m_killRecord.Remove(part.ParentGroup.RootPart.LocalId); | 3808 | // m_killRecord.Remove(part.ParentGroup.RootPart.LocalId); |
3809 | } | 3809 | // } |
3810 | } | 3810 | } |
3811 | else | 3811 | else |
3812 | { | 3812 | { |
@@ -3822,13 +3822,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3822 | // after the root prim has been deleted. | 3822 | // after the root prim has been deleted. |
3823 | // | 3823 | // |
3824 | // We ignore this for attachments because attaching something from inworld breaks unless we do. | 3824 | // We ignore this for attachments because attaching something from inworld breaks unless we do. |
3825 | lock (m_killRecord) | 3825 | // lock (m_killRecord) |
3826 | { | 3826 | // { |
3827 | if (m_killRecord.Contains(part.LocalId)) | 3827 | // if (m_killRecord.Contains(part.LocalId)) |
3828 | continue; | 3828 | // continue; |
3829 | if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) | 3829 | // if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) |
3830 | continue; | 3830 | // continue; |
3831 | } | 3831 | // } |
3832 | } | 3832 | } |
3833 | 3833 | ||
3834 | if (part.ParentGroup.IsAttachment && m_disableFacelights) | 3834 | if (part.ParentGroup.IsAttachment && m_disableFacelights) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 07b36b3..33a17db 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -875,7 +875,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
875 | 875 | ||
876 | IsChildAgent = false; | 876 | IsChildAgent = false; |
877 | 877 | ||
878 | Animator.TrySetMovementAnimation("SIT"); | 878 | // Animator.TrySetMovementAnimation("SIT"); |
879 | } | 879 | } |
880 | else | 880 | else |
881 | { | 881 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2700495..3b8efd5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -116,6 +116,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
116 | protected Timer m_ShoutSayTimer; | 116 | protected Timer m_ShoutSayTimer; |
117 | protected int m_SayShoutCount = 0; | 117 | protected int m_SayShoutCount = 0; |
118 | 118 | ||
119 | private Dictionary<string, string> MovementAnimationsForLSL = | ||
120 | new Dictionary<string, string> { | ||
121 | {"FLY", "Flying"}, | ||
122 | {"FLYSLOW", "FlyingSlow"}, | ||
123 | {"HOVER_UP", "Hovering Up"}, | ||
124 | {"HOVER_DOWN", "Hovering Down"}, | ||
125 | {"HOVER", "Hovering"}, | ||
126 | {"LAND", "Landing"}, | ||
127 | {"FALLDOWN", "Falling Down"}, | ||
128 | {"PREJUMP", "PreJumping"}, | ||
129 | {"JUMP", "Jumping"}, | ||
130 | {"STANDUP", "Standing Up"}, | ||
131 | {"SOFT_LAND", "Soft Landing"}, | ||
132 | {"STAND", "Standing"}, | ||
133 | {"CROUCHWALK", "CrouchWalking"}, | ||
134 | {"RUN", "Running"}, | ||
135 | {"WALK", "Walking"}, | ||
136 | {"CROUCH", "Crouching"}, | ||
137 | {"TURNLEFT", "Turning Left"}, | ||
138 | {"TURNRIGHT", "Turning Right"} | ||
139 | }; | ||
140 | |||
119 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) | 141 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) |
120 | { | 142 | { |
121 | m_ShoutSayTimer = new Timer(1000); | 143 | m_ShoutSayTimer = new Timer(1000); |
@@ -2485,7 +2507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2485 | } | 2507 | } |
2486 | else | 2508 | else |
2487 | { | 2509 | { |
2488 | vel = m_host.Velocity; | 2510 | vel = m_host.ParentGroup.RootPart.Velocity; |
2489 | } | 2511 | } |
2490 | 2512 | ||
2491 | return new LSL_Vector(vel.X, vel.Y, vel.Z); | 2513 | return new LSL_Vector(vel.X, vel.Y, vel.Z); |
@@ -4652,14 +4674,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4652 | 4674 | ||
4653 | if (m_host.RegionHandle == presence.RegionHandle) | 4675 | if (m_host.RegionHandle == presence.RegionHandle) |
4654 | { | 4676 | { |
4655 | Dictionary<UUID, string> animationstateNames = DefaultAvatarAnimations.AnimStateNames; | ||
4656 | |||
4657 | if (presence != null) | 4677 | if (presence != null) |
4658 | { | 4678 | { |
4659 | AnimationSet currentAnims = presence.Animator.Animations; | 4679 | if (presence.SitGround) |
4660 | string currentAnimationState = String.Empty; | 4680 | return "Sitting on Ground"; |
4661 | if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) | 4681 | if (presence.ParentID != 0 || presence.ParentUUID != UUID.Zero) |
4662 | return currentAnimationState; | 4682 | return "Sitting"; |
4683 | |||
4684 | string movementAnimation = presence.Animator.CurrentMovementAnimation; | ||
4685 | string lslMovementAnimation; | ||
4686 | |||
4687 | if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation)) | ||
4688 | return lslMovementAnimation; | ||
4663 | } | 4689 | } |
4664 | } | 4690 | } |
4665 | 4691 | ||