aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs40
4 files changed, 56 insertions, 30 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 5912a15..77dbca7 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 e2f32dd..2b1fb3d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -867,7 +867,7 @@ namespace OpenSim.Region.Framework.Scenes
867 867
868 IsChildAgent = false; 868 IsChildAgent = false;
869 869
870 Animator.TrySetMovementAnimation("SIT"); 870// Animator.TrySetMovementAnimation("SIT");
871 } 871 }
872 else 872 else
873 { 873 {
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 9a40ab5..9b3b51b 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -3252,9 +3252,9 @@ namespace OpenSim.Region.Physics.OdePlugin
3252 } 3252 }
3253 3253
3254 3254
3255 private void changeAddImpulse(Vector3 impulse) 3255 private void changeAddForce(Vector3 theforce)
3256 { 3256 {
3257 m_forceacc += impulse *m_invTimeStep; 3257 m_forceacc += theforce;
3258 if (!m_isSelected) 3258 if (!m_isSelected)
3259 { 3259 {
3260 lock (this) 3260 lock (this)
@@ -3960,7 +3960,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3960 break; 3960 break;
3961 3961
3962 case changes.AddForce: 3962 case changes.AddForce:
3963 changeAddImpulse((Vector3)arg); 3963 changeAddForce((Vector3)arg);
3964 break; 3964 break;
3965 3965
3966 case changes.AddAngForce: 3966 case changes.AddAngForce:
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ea78dc3..ec0966b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -111,6 +111,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
111 protected Timer m_ShoutSayTimer; 111 protected Timer m_ShoutSayTimer;
112 protected int m_SayShoutCount = 0; 112 protected int m_SayShoutCount = 0;
113 113
114 private Dictionary<string, string> MovementAnimationsForLSL =
115 new Dictionary<string, string> {
116 {"FLY", "Flying"},
117 {"FLYSLOW", "FlyingSlow"},
118 {"HOVER_UP", "Hovering Up"},
119 {"HOVER_DOWN", "Hovering Down"},
120 {"HOVER", "Hovering"},
121 {"LAND", "Landing"},
122 {"FALLDOWN", "Falling Down"},
123 {"PREJUMP", "PreJumping"},
124 {"JUMP", "Jumping"},
125 {"STANDUP", "Standing Up"},
126 {"SOFT_LAND", "Soft Landing"},
127 {"STAND", "Standing"},
128 {"CROUCHWALK", "CrouchWalking"},
129 {"RUN", "Running"},
130 {"WALK", "Walking"},
131 {"CROUCH", "Crouching"},
132 {"TURNLEFT", "Turning Left"},
133 {"TURNRIGHT", "Turning Right"}
134 };
135
114 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) 136 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
115 { 137 {
116 m_ShoutSayTimer = new Timer(1000); 138 m_ShoutSayTimer = new Timer(1000);
@@ -2523,7 +2545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2523 } 2545 }
2524 else 2546 else
2525 { 2547 {
2526 vel = m_host.Velocity; 2548 vel = m_host.ParentGroup.RootPart.Velocity;
2527 } 2549 }
2528 2550
2529 return new LSL_Vector(vel.X, vel.Y, vel.Z); 2551 return new LSL_Vector(vel.X, vel.Y, vel.Z);
@@ -4820,14 +4842,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4820 4842
4821 if (m_host.RegionHandle == presence.RegionHandle) 4843 if (m_host.RegionHandle == presence.RegionHandle)
4822 { 4844 {
4823 Dictionary<UUID, string> animationstateNames = DefaultAvatarAnimations.AnimStateNames;
4824
4825 if (presence != null) 4845 if (presence != null)
4826 { 4846 {
4827 AnimationSet currentAnims = presence.Animator.Animations; 4847 if (presence.SitGround)
4828 string currentAnimationState = String.Empty; 4848 return "Sitting on Ground";
4829 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) 4849 if (presence.ParentID != 0 || presence.ParentUUID != UUID.Zero)
4830 return currentAnimationState; 4850 return "Sitting";
4851
4852 string movementAnimation = presence.Animator.CurrentMovementAnimation;
4853 string lslMovementAnimation;
4854
4855 if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation))
4856 return lslMovementAnimation;
4831 } 4857 }
4832 } 4858 }
4833 4859