diff options
author | Melanie | 2009-11-21 16:00:18 +0000 |
---|---|---|
committer | Melanie | 2009-11-21 16:00:18 +0000 |
commit | 0844e5951cac40120aa0e4407b79c0f8b171b0ec (patch) | |
tree | dbf0d59676a46a32d8c9992421c245b3f27e5af2 /OpenSim | |
parent | Merge branch 'careminster' into tests (diff) | |
parent | * Hack to get avatar to land on prim. This is a big nasty hack that tricks ... (diff) | |
download | opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.zip opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.tar.gz opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.tar.bz2 opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 20 |
6 files changed, 38 insertions, 5 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index e43d634..fe8f020 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -1099,8 +1099,6 @@ namespace OpenSim.Framework | |||
1099 | prim.Sculpt = new Primitive.SculptData(); | 1099 | prim.Sculpt = new Primitive.SculptData(); |
1100 | prim.Sculpt.Type = (OpenMetaverse.SculptType)this.SculptType; | 1100 | prim.Sculpt.Type = (OpenMetaverse.SculptType)this.SculptType; |
1101 | prim.Sculpt.SculptTexture = this.SculptTexture; | 1101 | prim.Sculpt.SculptTexture = this.SculptTexture; |
1102 | |||
1103 | return prim; | ||
1104 | } | 1102 | } |
1105 | 1103 | ||
1106 | prim.PrimData.PathShearX = this.PathShearX < 128 ? (float)this.PathShearX * 0.01f : (float)(this.PathShearX - 256) * 0.01f; | 1104 | prim.PrimData.PathShearX = this.PathShearX < 128 ? (float)this.PathShearX * 0.01f : (float)(this.PathShearX - 256) * 0.01f; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2e15b86..a430b1e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1266,7 +1266,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1266 | // allocations, and there is no more work to be done until someone logs in | 1266 | // allocations, and there is no more work to be done until someone logs in |
1267 | GC.Collect(); | 1267 | GC.Collect(); |
1268 | 1268 | ||
1269 | m_log.DebugFormat("[REGION]: Enabling Logins for {0}", RegionInfo.RegionName); | 1269 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); |
1270 | loginsdisabled = false; | 1270 | loginsdisabled = false; |
1271 | } | 1271 | } |
1272 | } | 1272 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index bf2f3d3..10b7d94 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2075,6 +2075,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2075 | { | 2075 | { |
2076 | if (PhysActor != null) | 2076 | if (PhysActor != null) |
2077 | { | 2077 | { |
2078 | |||
2078 | Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0); | 2079 | Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0); |
2079 | 2080 | ||
2080 | if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W)) | 2081 | if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W)) |
@@ -2082,6 +2083,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2082 | m_parentGroup.AbsolutePosition = newpos; | 2083 | m_parentGroup.AbsolutePosition = newpos; |
2083 | return; | 2084 | return; |
2084 | } | 2085 | } |
2086 | //m_parentGroup.RootPart.m_groupPosition = newpos; | ||
2085 | } | 2087 | } |
2086 | ScheduleTerseUpdate(); | 2088 | ScheduleTerseUpdate(); |
2087 | 2089 | ||
@@ -2393,6 +2395,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2393 | if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | 2395 | if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || |
2394 | !Acceleration.Equals(m_lastAcceleration) || | 2396 | !Acceleration.Equals(m_lastAcceleration) || |
2395 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | 2397 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || |
2398 | Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || | ||
2396 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || | 2399 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || |
2397 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || | 2400 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || |
2398 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) | 2401 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) |
@@ -2427,6 +2430,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2427 | m_updateFlag = 0; //Same here | 2430 | m_updateFlag = 0; //Same here |
2428 | } | 2431 | } |
2429 | } | 2432 | } |
2433 | ClearUpdateSchedule(); | ||
2430 | } | 2434 | } |
2431 | 2435 | ||
2432 | /// <summary> | 2436 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1dedcf1..424c25b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -995,6 +995,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
995 | 995 | ||
996 | Animator.TrySetMovementAnimation("LAND"); | 996 | Animator.TrySetMovementAnimation("LAND"); |
997 | SendFullUpdateToAllClients(); | 997 | SendFullUpdateToAllClients(); |
998 | ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | ||
999 | AbsolutePosition, Velocity, -Vector3.UnitZ, m_bodyRot, Vector4.UnitW, m_uuid, null, GetUpdatePriority(ControllingClient))); | ||
998 | } | 1000 | } |
999 | 1001 | ||
1000 | public void AddNeighbourRegion(ulong regionHandle, string cap) | 1002 | public void AddNeighbourRegion(ulong regionHandle, string cap) |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 2bf96e4..c7e0848 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -2416,6 +2416,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
2416 | { | 2416 | { |
2417 | // Averate previous velocity with the new one so | 2417 | // Averate previous velocity with the new one so |
2418 | // client object interpolation works a 'little' better | 2418 | // client object interpolation works a 'little' better |
2419 | if (_zeroFlag) | ||
2420 | return Vector3.Zero; | ||
2421 | |||
2419 | Vector3 returnVelocity = Vector3.Zero; | 2422 | Vector3 returnVelocity = Vector3.Zero; |
2420 | returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; | 2423 | returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; |
2421 | returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y)/2; | 2424 | returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y)/2; |
@@ -2702,7 +2705,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2702 | //outofBounds = true; | 2705 | //outofBounds = true; |
2703 | } | 2706 | } |
2704 | 2707 | ||
2705 | // float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); | 2708 | //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); |
2706 | //Console.WriteLine("Adiff " + m_primName + " = " + Adiff); | 2709 | //Console.WriteLine("Adiff " + m_primName + " = " + Adiff); |
2707 | if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02) | 2710 | if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02) |
2708 | && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02) | 2711 | && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02) |
@@ -2718,6 +2721,8 @@ Console.WriteLine(" JointCreateFixed"); | |||
2718 | { | 2721 | { |
2719 | //m_log.Debug(Math.Abs(m_lastposition.X - l_position.X).ToString()); | 2722 | //m_log.Debug(Math.Abs(m_lastposition.X - l_position.X).ToString()); |
2720 | _zeroFlag = false; | 2723 | _zeroFlag = false; |
2724 | m_lastUpdateSent = false; | ||
2725 | //m_throttleUpdates = false; | ||
2721 | } | 2726 | } |
2722 | 2727 | ||
2723 | if (_zeroFlag) | 2728 | if (_zeroFlag) |
@@ -2744,7 +2749,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
2744 | m_rotationalVelocity = pv; | 2749 | m_rotationalVelocity = pv; |
2745 | 2750 | ||
2746 | if (_parent == null) | 2751 | if (_parent == null) |
2752 | { | ||
2747 | base.RequestPhysicsterseUpdate(); | 2753 | base.RequestPhysicsterseUpdate(); |
2754 | } | ||
2748 | 2755 | ||
2749 | m_lastUpdateSent = true; | 2756 | m_lastUpdateSent = true; |
2750 | } | 2757 | } |
@@ -2754,7 +2761,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
2754 | if (lastZeroFlag != _zeroFlag) | 2761 | if (lastZeroFlag != _zeroFlag) |
2755 | { | 2762 | { |
2756 | if (_parent == null) | 2763 | if (_parent == null) |
2764 | { | ||
2757 | base.RequestPhysicsterseUpdate(); | 2765 | base.RequestPhysicsterseUpdate(); |
2766 | } | ||
2758 | } | 2767 | } |
2759 | 2768 | ||
2760 | m_lastVelocity = _velocity; | 2769 | m_lastVelocity = _velocity; |
@@ -2787,7 +2796,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
2787 | if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate) | 2796 | if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate) |
2788 | { | 2797 | { |
2789 | if (_parent == null) | 2798 | if (_parent == null) |
2799 | { | ||
2790 | base.RequestPhysicsterseUpdate(); | 2800 | base.RequestPhysicsterseUpdate(); |
2801 | } | ||
2791 | } | 2802 | } |
2792 | else | 2803 | else |
2793 | { | 2804 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index 41ecfd3..e427f50 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -722,8 +722,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
722 | if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count) | 722 | if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count) |
723 | return retstr; | 723 | return retstr; |
724 | 724 | ||
725 | foreach (SYMBOL s in fls.kids) | 725 | for (int i = 0; i < fls.kids.Count; i++) |
726 | { | 726 | { |
727 | SYMBOL s = (SYMBOL)fls.kids[i]; | ||
728 | |||
729 | // Statements surrounded by parentheses in for loops | ||
730 | // | ||
731 | // e.g. for ((i = 0), (j = 7); (i < 10); (++i)) | ||
732 | // | ||
733 | // are legal in LSL but not in C# so we need to discard the parentheses | ||
734 | // | ||
735 | // The following, however, does not appear to be legal in LLS | ||
736 | // | ||
737 | // for ((i = 0, j = 7); (i < 10); (++i)) | ||
738 | // | ||
739 | // As of Friday 20th November 2009, the Linden Lab simulators appear simply never to compile or run this | ||
740 | // script but with no debug or warnings at all! Therefore, we won't deal with this yet (which looks | ||
741 | // like it would be considerably more complicated to handle). | ||
742 | while (s is ParenthesisExpression) | ||
743 | s = (SYMBOL)s.kids.Pop(); | ||
744 | |||
727 | retstr += GenerateNode(s); | 745 | retstr += GenerateNode(s); |
728 | if (0 < comma--) | 746 | if (0 < comma--) |
729 | retstr += Generate(", "); | 747 | retstr += Generate(", "); |