aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJeff Ames2008-06-10 08:35:46 +0000
committerJeff Ames2008-06-10 08:35:46 +0000
commit5910a49da6e16d6e3718fffad73c8a24efcec80d (patch)
tree5f5852f643a77e72b45ad49af0538bdf0838b760 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parent* This completes ObjectDuplicateOnRay. (diff)
downloadopensim-SC_OLD-5910a49da6e16d6e3718fffad73c8a24efcec80d.zip
opensim-SC_OLD-5910a49da6e16d6e3718fffad73c8a24efcec80d.tar.gz
opensim-SC_OLD-5910a49da6e16d6e3718fffad73c8a24efcec80d.tar.bz2
opensim-SC_OLD-5910a49da6e16d6e3718fffad73c8a24efcec80d.tar.xz
Update svn properties. Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs44
1 files changed, 11 insertions, 33 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 2515122..42df746 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1391,7 +1391,6 @@ namespace OpenSim.Region.Environment.Scenes
1391 // distance2 = (float)GetDistanceTo(q, iray.Origin); 1391 // distance2 = (float)GetDistanceTo(q, iray.Origin);
1392 //} 1392 //}
1393 1393
1394
1395 if (distance2 < returnresult.distance) 1394 if (distance2 < returnresult.distance)
1396 { 1395 {
1397 returnresult.distance = distance2; 1396 returnresult.distance = distance2;
@@ -1410,8 +1409,8 @@ namespace OpenSim.Region.Environment.Scenes
1410 if (scaleComponent.y != 0) ScaleOffset = AXscale.y; 1409 if (scaleComponent.y != 0) ScaleOffset = AXscale.y;
1411 if (scaleComponent.z != 0) ScaleOffset = AXscale.z; 1410 if (scaleComponent.z != 0) ScaleOffset = AXscale.z;
1412 ScaleOffset = Math.Abs(ScaleOffset); 1411 ScaleOffset = Math.Abs(ScaleOffset);
1413 Vector3 offset = (returnresult.normal * ScaleOffset); 1412 Vector3 offset = returnresult.normal * ScaleOffset;
1414 returnresult.ipoint = (AXpos + offset ); 1413 returnresult.ipoint = AXpos + offset;
1415 1414
1416 ///pos = (intersectionpoint + offset); 1415 ///pos = (intersectionpoint + offset);
1417 } 1416 }
@@ -1420,10 +1419,8 @@ namespace OpenSim.Region.Environment.Scenes
1420 returnresult.normal = normals[i]; 1419 returnresult.normal = normals[i];
1421 } 1420 }
1422 returnresult.AAfaceNormal = AAfacenormals[i]; 1421 returnresult.AAfaceNormal = AAfacenormals[i];
1423
1424 } 1422 }
1425 } 1423 }
1426
1427 } 1424 }
1428 return returnresult; 1425 return returnresult;
1429 } 1426 }
@@ -1443,8 +1440,8 @@ namespace OpenSim.Region.Environment.Scenes
1443 //{ 1440 //{
1444 m_shape.State = (byte)AttachmentPoint; 1441 m_shape.State = (byte)AttachmentPoint;
1445 //} 1442 //}
1446
1447 } 1443 }
1444
1448 /// <summary> 1445 /// <summary>
1449 /// 1446 ///
1450 /// </summary> 1447 /// </summary>
@@ -1472,7 +1469,6 @@ namespace OpenSim.Region.Environment.Scenes
1472 if (m_parentGroup != null) 1469 if (m_parentGroup != null)
1473 { 1470 {
1474 m_parentGroup.SetAxisRotation(axis, rotate); 1471 m_parentGroup.SetAxisRotation(axis, rotate);
1475
1476 } 1472 }
1477 } 1473 }
1478 1474
@@ -1494,11 +1490,9 @@ namespace OpenSim.Region.Environment.Scenes
1494 { 1490 {
1495 PhysActor.FloatOnWater = false; 1491 PhysActor.FloatOnWater = false;
1496 } 1492 }
1497
1498 } 1493 }
1499 } 1494 }
1500 1495
1501
1502 public LLVector3 GetSitTargetPositionLL() 1496 public LLVector3 GetSitTargetPositionLL()
1503 { 1497 {
1504 return new LLVector3(m_sitTargetPosition.x, m_sitTargetPosition.y, m_sitTargetPosition.z); 1498 return new LLVector3(m_sitTargetPosition.x, m_sitTargetPosition.y, m_sitTargetPosition.z);
@@ -1544,7 +1538,6 @@ namespace OpenSim.Region.Environment.Scenes
1544 return m_sitTargetAvatar; 1538 return m_sitTargetAvatar;
1545 } 1539 }
1546 1540
1547
1548 public LLUUID GetRootPartUUID() 1541 public LLUUID GetRootPartUUID()
1549 { 1542 {
1550 if (m_parentGroup != null) 1543 if (m_parentGroup != null)
@@ -1797,8 +1790,6 @@ namespace OpenSim.Region.Environment.Scenes
1797 1790
1798 public void UpdatePrimFlags(ushort type, bool inUse, byte[] data) 1791 public void UpdatePrimFlags(ushort type, bool inUse, byte[] data)
1799 { 1792 {
1800
1801
1802 //m_log.Info("TSomething1:" + ((type & (ushort)ExtraParamType.Something1) == (ushort)ExtraParamType.Something1)); 1793 //m_log.Info("TSomething1:" + ((type & (ushort)ExtraParamType.Something1) == (ushort)ExtraParamType.Something1));
1803 //m_log.Info("TSomething2:" + ((type & (ushort)ExtraParamType.Something2) == (ushort)ExtraParamType.Something2)); 1794 //m_log.Info("TSomething2:" + ((type & (ushort)ExtraParamType.Something2) == (ushort)ExtraParamType.Something2));
1804 //m_log.Info("TSomething3:" + ((type & (ushort)ExtraParamType.Something3) == (ushort)ExtraParamType.Something3)); 1795 //m_log.Info("TSomething3:" + ((type & (ushort)ExtraParamType.Something3) == (ushort)ExtraParamType.Something3));
@@ -1814,7 +1805,6 @@ namespace OpenSim.Region.Environment.Scenes
1814 //bool IsLocked = false; 1805 //bool IsLocked = false;
1815 int i = 0; 1806 int i = 0;
1816 1807
1817
1818 try 1808 try
1819 { 1809 {
1820 i += 46; 1810 i += 46;
@@ -1858,7 +1848,6 @@ namespace OpenSim.Region.Environment.Scenes
1858 } 1848 }
1859 } 1849 }
1860 1850
1861
1862 if (IsPhantom) 1851 if (IsPhantom)
1863 { 1852 {
1864 AddFlag(LLObject.ObjectFlags.Phantom); 1853 AddFlag(LLObject.ObjectFlags.Phantom);
@@ -1927,6 +1916,7 @@ namespace OpenSim.Region.Environment.Scenes
1927 // System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString()); 1916 // System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
1928 ScheduleFullUpdate(); 1917 ScheduleFullUpdate();
1929 } 1918 }
1919
1930 public void ScriptSetPhysicsStatus(bool UsePhysics) 1920 public void ScriptSetPhysicsStatus(bool UsePhysics)
1931 { 1921 {
1932 if (m_parentGroup != null) 1922 if (m_parentGroup != null)
@@ -1934,6 +1924,7 @@ namespace OpenSim.Region.Environment.Scenes
1934 m_parentGroup.ScriptSetPhysicsStatus(UsePhysics); 1924 m_parentGroup.ScriptSetPhysicsStatus(UsePhysics);
1935 } 1925 }
1936 } 1926 }
1927
1937 public void ScriptSetPhantomStatus(bool Phantom) 1928 public void ScriptSetPhantomStatus(bool Phantom)
1938 { 1929 {
1939 if (m_parentGroup != null) 1930 if (m_parentGroup != null)
@@ -1941,6 +1932,7 @@ namespace OpenSim.Region.Environment.Scenes
1941 m_parentGroup.ScriptSetPhantomStatus(Phantom); 1932 m_parentGroup.ScriptSetPhantomStatus(Phantom);
1942 } 1933 }
1943 } 1934 }
1935
1944 public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) 1936 public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew)
1945 { 1937 {
1946 if (PhysActor != null) 1938 if (PhysActor != null)
@@ -1965,7 +1957,6 @@ namespace OpenSim.Region.Environment.Scenes
1965 /// that's not wholesome. Had to make Scene public 1957 /// that's not wholesome. Had to make Scene public
1966 //PhysActor = null; 1958 //PhysActor = null;
1967 1959
1968
1969 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) 1960 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0)
1970 { 1961 {
1971 //PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1962 //PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
@@ -1989,7 +1980,6 @@ namespace OpenSim.Region.Environment.Scenes
1989 PhysActor.link(ParentGroup.RootPart.PhysActor); 1980 PhysActor.link(ParentGroup.RootPart.PhysActor);
1990 } 1981 }
1991 } 1982 }
1992
1993 } 1983 }
1994 } 1984 }
1995 } 1985 }
@@ -2029,7 +2019,6 @@ namespace OpenSim.Region.Environment.Scenes
2029 } 2019 }
2030 } 2020 }
2031 } 2021 }
2032
2033 } 2022 }
2034 2023
2035 #endregion 2024 #endregion
@@ -2394,7 +2383,6 @@ namespace OpenSim.Region.Environment.Scenes
2394 } 2383 }
2395 } 2384 }
2396 2385
2397
2398 public void AddFullUpdateToAvatar(ScenePresence presence) 2386 public void AddFullUpdateToAvatar(ScenePresence presence)
2399 { 2387 {
2400 presence.QueuePartForUpdate(this); 2388 presence.QueuePartForUpdate(this);
@@ -2454,13 +2442,11 @@ namespace OpenSim.Region.Environment.Scenes
2454 } 2442 }
2455 } 2443 }
2456 2444
2457
2458 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; 2445 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
2459 remoteClient.SendPrimitiveToClient( 2446 remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape,
2460 m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, 2447 lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, OwnerID,
2461 lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, 2448 m_text, color, ParentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment,
2462 OwnerID, 2449 m_attachmentPoint,fromAssetID, Sound, SoundGain, SoundFlags, SoundRadius);
2463 m_text, color, ParentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment, m_attachmentPoint,fromAssetID, Sound, SoundGain, SoundFlags, SoundRadius);
2464 } 2450 }
2465 2451
2466 /// Terse updates 2452 /// Terse updates
@@ -2557,7 +2543,6 @@ namespace OpenSim.Region.Environment.Scenes
2557 m_parentGroup.AbsolutePosition = newpos; 2543 m_parentGroup.AbsolutePosition = newpos;
2558 return; 2544 return;
2559 } 2545 }
2560
2561 } 2546 }
2562 ScheduleTerseUpdate(); 2547 ScheduleTerseUpdate();
2563 2548
@@ -2578,7 +2563,6 @@ namespace OpenSim.Region.Environment.Scenes
2578 { 2563 {
2579 } 2564 }
2580 2565
2581
2582 public void SetText(string text) 2566 public void SetText(string text)
2583 { 2567 {
2584 Text = text; 2568 Text = text;
@@ -2724,7 +2708,6 @@ namespace OpenSim.Region.Environment.Scenes
2724 info.AddValue("PayPrice", PayPrice); 2708 info.AddValue("PayPrice", PayPrice);
2725 } 2709 }
2726 2710
2727
2728 public void Undo() 2711 public void Undo()
2729 { 2712 {
2730 if (m_undo.Count > 0) 2713 if (m_undo.Count > 0)
@@ -2837,10 +2820,9 @@ namespace OpenSim.Region.Environment.Scenes
2837 else 2820 else
2838 ScheduleFullUpdate(); 2821 ScheduleFullUpdate();
2839 } 2822 }
2823
2840 public void PhysicsCollision(EventArgs e) 2824 public void PhysicsCollision(EventArgs e)
2841 { 2825 {
2842 //return;
2843
2844 // single threaded here 2826 // single threaded here
2845 if (e == null) 2827 if (e == null)
2846 { 2828 {
@@ -2865,7 +2847,6 @@ namespace OpenSim.Region.Environment.Scenes
2865 startedColliders.Add(localid); 2847 startedColliders.Add(localid);
2866 } 2848 }
2867 2849
2868
2869 //m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString()); 2850 //m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString());
2870 } 2851 }
2871 } 2852 }
@@ -2878,7 +2859,6 @@ namespace OpenSim.Region.Environment.Scenes
2878 endedColliders.Add(localID); 2859 endedColliders.Add(localID);
2879 } 2860 }
2880 } 2861 }
2881
2882 2862
2883 //add the items that started colliding this time to the last colliders list. 2863 //add the items that started colliding this time to the last colliders list.
2884 foreach (uint localID in startedColliders) 2864 foreach (uint localID in startedColliders)
@@ -2944,7 +2924,6 @@ namespace OpenSim.Region.Environment.Scenes
2944 colliding.Add(detobj); 2924 colliding.Add(detobj);
2945 } 2925 }
2946 } 2926 }
2947
2948 } 2927 }
2949 } 2928 }
2950 } 2929 }
@@ -2958,7 +2937,6 @@ namespace OpenSim.Region.Environment.Scenes
2958 return; 2937 return;
2959 m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage); 2938 m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
2960 } 2939 }
2961
2962 } 2940 }
2963 } 2941 }
2964 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0) 2942 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0)