aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parent* removed always true if (diff)
downloadopensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs93
1 files changed, 41 insertions, 52 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 20d596a..5b74c9b 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -28,6 +28,7 @@
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Drawing;
31using System.IO; 32using System.IO;
32using System.Text; 33using System.Text;
33using System.Xml; 34using System.Xml;
@@ -38,7 +39,6 @@ using OpenSim.Framework;
38using OpenSim.Framework.Console; 39using OpenSim.Framework.Console;
39using OpenSim.Region.Environment.Interfaces; 40using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Physics.Manager; 41using OpenSim.Region.Physics.Manager;
41using System.Drawing;
42 42
43namespace OpenSim.Region.Environment.Scenes 43namespace OpenSim.Region.Environment.Scenes
44{ 44{
@@ -74,11 +74,13 @@ namespace OpenSim.Region.Environment.Scenes
74 { 74 {
75 get { return m_rootPart.RotationOffset; } 75 get { return m_rootPart.RotationOffset; }
76 } 76 }
77
77 public LLUUID GroupID 78 public LLUUID GroupID
78 { 79 {
79 get { return m_rootPart.GroupID; } 80 get { return m_rootPart.GroupID; }
80 set { m_rootPart.GroupID = value; } 81 set { m_rootPart.GroupID = value; }
81 } 82 }
83
82 /// <summary> 84 /// <summary>
83 /// 85 ///
84 /// </summary> 86 /// </summary>
@@ -242,7 +244,7 @@ namespace OpenSim.Region.Environment.Scenes
242 part.ParentID = 0; 244 part.ParentID = 0;
243 part.LinkNum = 0; 245 part.LinkNum = 0;
244 m_parts.Add(part.UUID, part); 246 m_parts.Add(part.UUID, part);
245 247
246 SetPartAsRoot(part); 248 SetPartAsRoot(part);
247 249
248 RegionHandle = regionHandle; 250 RegionHandle = regionHandle;
@@ -295,7 +297,6 @@ namespace OpenSim.Region.Environment.Scenes
295 sr.Close(); 297 sr.Close();
296 298
297 299
298
299 m_rootPart.LocalID = m_scene.PrimIDAllocate(); 300 m_rootPart.LocalID = m_scene.PrimIDAllocate();
300 m_rootPart.ParentID = 0; 301 m_rootPart.ParentID = 0;
301 m_rootPart.RegionHandle = m_regionHandle; 302 m_rootPart.RegionHandle = m_regionHandle;
@@ -376,9 +377,10 @@ namespace OpenSim.Region.Environment.Scenes
376 377
377 foreach (SceneObjectPart part in m_parts.Values) 378 foreach (SceneObjectPart part in m_parts.Values)
378 { 379 {
379 380 Vector3 partPosition =
380 Vector3 partPosition = new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z); 381 new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z);
381 Quaternion parentrotation = new Quaternion(GroupRotation.W, GroupRotation.X, GroupRotation.Y, GroupRotation.Z); 382 Quaternion parentrotation =
383 new Quaternion(GroupRotation.W, GroupRotation.X, GroupRotation.Y, GroupRotation.Z);
382 384
383 // Telling the prim to raytrace. 385 // Telling the prim to raytrace.
384 EntityIntersection inter = part.TestIntersection(hRay, parentrotation); 386 EntityIntersection inter = part.TestIntersection(hRay, parentrotation);
@@ -389,14 +391,11 @@ namespace OpenSim.Region.Environment.Scenes
389 float idist = 256f; 391 float idist = 256f;
390 392
391 393
392
393
394 if (inter.HitTF) 394 if (inter.HitTF)
395 { 395 {
396 // We need to find the closest prim to return to the testcaller along the ray 396 // We need to find the closest prim to return to the testcaller along the ray
397 if (inter.distance < idist) 397 if (inter.distance < idist)
398 { 398 {
399
400 idist = inter.distance; 399 idist = inter.distance;
401 returnresult.HitTF = true; 400 returnresult.HitTF = true;
402 returnresult.ipoint = inter.ipoint; 401 returnresult.ipoint = inter.ipoint;
@@ -405,15 +404,11 @@ namespace OpenSim.Region.Environment.Scenes
405 returnresult.distance = inter.distance; 404 returnresult.distance = inter.distance;
406 } 405 }
407 } 406 }
408
409
410 } 407 }
411 return returnresult; 408 return returnresult;
412
413 } 409 }
414 410
415 411
416
417 /// <summary> 412 /// <summary>
418 /// 413 ///
419 /// </summary> 414 /// </summary>
@@ -524,7 +519,7 @@ namespace OpenSim.Region.Environment.Scenes
524 /// <returns></returns> 519 /// <returns></returns>
525 public SceneObjectGroup Copy(LLUUID cAgentID, LLUUID cGroupID) 520 public SceneObjectGroup Copy(LLUUID cAgentID, LLUUID cGroupID)
526 { 521 {
527 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); 522 SceneObjectGroup dupe = (SceneObjectGroup) MemberwiseClone();
528 dupe.m_parts = new Dictionary<LLUUID, SceneObjectPart>(); 523 dupe.m_parts = new Dictionary<LLUUID, SceneObjectPart>();
529 dupe.m_parts.Clear(); 524 dupe.m_parts.Clear();
530 //dupe.OwnerID = AgentID; 525 //dupe.OwnerID = AgentID;
@@ -549,9 +544,8 @@ namespace OpenSim.Region.Environment.Scenes
549 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), 544 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z),
550 new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, 545 new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
551 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z), 546 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z),
552 dupe.RootPart.PhysActor.IsPhysical); 547 dupe.RootPart.PhysActor.IsPhysical);
553 dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); 548 dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
554
555 } 549 }
556 // Now we've made a copy that replaces this one, we need to 550 // Now we've made a copy that replaces this one, we need to
557 // switch the owner to the person who did the copying 551 // switch the owner to the person who did the copying
@@ -559,8 +553,8 @@ namespace OpenSim.Region.Environment.Scenes
559 // So, we have to make a copy of this one, set it in it's place then set the owner on this one 553 // So, we have to make a copy of this one, set it in it's place then set the owner on this one
560 554
561 SetRootPartOwner(m_rootPart, cAgentID, cGroupID); 555 SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
562 556
563 557
564 m_rootPart.ScheduleFullUpdate(); 558 m_rootPart.ScheduleFullUpdate();
565 559
566 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); 560 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
@@ -571,7 +565,6 @@ namespace OpenSim.Region.Environment.Scenes
571 dupe.CopyPart(part, OwnerID, GroupID); 565 dupe.CopyPart(part, OwnerID, GroupID);
572 SetPartOwner(part, cAgentID, cGroupID); 566 SetPartOwner(part, cAgentID, cGroupID);
573 part.ScheduleFullUpdate(); 567 part.ScheduleFullUpdate();
574
575 } 568 }
576 } 569 }
577 dupe.UpdateParentIDs(); 570 dupe.UpdateParentIDs();
@@ -601,7 +594,7 @@ namespace OpenSim.Region.Environment.Scenes
601 part.OwnerID = cAgentID; 594 part.OwnerID = cAgentID;
602 part.GroupID = cGroupID; 595 part.GroupID = cGroupID;
603 596
604 597
605 if (part.OwnerID != cAgentID) 598 if (part.OwnerID != cAgentID)
606 { 599 {
607 // Apply Next Owner Permissions if we're not bypassing permissions 600 // Apply Next Owner Permissions if we're not bypassing permissions
@@ -637,6 +630,7 @@ namespace OpenSim.Region.Environment.Scenes
637 m_parts.Add(part.UUID, part); 630 m_parts.Add(part.UUID, part);
638 } 631 }
639 } 632 }
633
640 /// <summary> 634 /// <summary>
641 /// 635 ///
642 /// </summary> 636 /// </summary>
@@ -666,8 +660,8 @@ namespace OpenSim.Region.Environment.Scenes
666 objPropDB.Description = Helpers.StringToField(RootPart.Description); 660 objPropDB.Description = Helpers.StringToField(RootPart.Description);
667 objPropFamilyPack.ObjectData = objPropDB; 661 objPropFamilyPack.ObjectData = objPropDB;
668 remoteClient.OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); 662 remoteClient.OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task);
669
670 } 663 }
664
671 public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) 665 public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID)
672 { 666 {
673 part.OwnerID = cAgentID; 667 part.OwnerID = cAgentID;
@@ -884,12 +878,12 @@ namespace OpenSim.Region.Environment.Scenes
884 Quaternion parentRot = 878 Quaternion parentRot =
885 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, 879 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
886 m_rootPart.RotationOffset.Z); 880 m_rootPart.RotationOffset.Z);
887 axPos = parentRot.Inverse() * axPos; 881 axPos = parentRot.Inverse()*axPos;
888 linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z); 882 linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
889 Quaternion oldRot = 883 Quaternion oldRot =
890 new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, linkPart.RotationOffset.Y, 884 new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, linkPart.RotationOffset.Y,
891 linkPart.RotationOffset.Z); 885 linkPart.RotationOffset.Z);
892 Quaternion newRot = parentRot.Inverse() * oldRot; 886 Quaternion newRot = parentRot.Inverse()*oldRot;
893 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); 887 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
894 linkPart.ParentID = m_rootPart.LocalID; 888 linkPart.ParentID = m_rootPart.LocalID;
895 linkPart.LinkNum = m_parts.Count; 889 linkPart.LinkNum = m_parts.Count;
@@ -949,7 +943,7 @@ namespace OpenSim.Region.Environment.Scenes
949 linkPart.OffsetPosition.Y, 943 linkPart.OffsetPosition.Y,
950 linkPart.OffsetPosition.Z); 944 linkPart.OffsetPosition.Z);
951 945
952 axPos = parentRot * axPos; 946 axPos = parentRot*axPos;
953 linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z); 947 linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
954 linkPart.GroupPosition = AbsolutePosition + linkPart.OffsetPosition; 948 linkPart.GroupPosition = AbsolutePosition + linkPart.OffsetPosition;
955 linkPart.OffsetPosition = new LLVector3(0, 0, 0); 949 linkPart.OffsetPosition = new LLVector3(0, 0, 0);
@@ -960,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes
960 linkPart.RotationOffset.X, 954 linkPart.RotationOffset.X,
961 linkPart.RotationOffset.Y, 955 linkPart.RotationOffset.Y,
962 linkPart.RotationOffset.Z); 956 linkPart.RotationOffset.Z);
963 Quaternion newRot = parentRot * oldRot; 957 Quaternion newRot = parentRot*oldRot;
964 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); 958 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
965 959
966 // Add physics information back to delinked part if appropriate 960 // Add physics information back to delinked part if appropriate
@@ -978,7 +972,6 @@ namespace OpenSim.Region.Environment.Scenes
978 linkPart.RotationOffset.Y, linkPart.RotationOffset.Z), 972 linkPart.RotationOffset.Y, linkPart.RotationOffset.Z),
979 m_rootPart.PhysActor.IsPhysical); 973 m_rootPart.PhysActor.IsPhysical);
980 m_rootPart.DoPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true); 974 m_rootPart.DoPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true);
981
982 } 975 }
983 976
984 SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); 977 SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
@@ -990,8 +983,8 @@ namespace OpenSim.Region.Environment.Scenes
990 else 983 else
991 { 984 {
992 MainLog.Instance.Verbose("SCENE", 985 MainLog.Instance.Verbose("SCENE",
993 "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", 986 "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}",
994 partID, LocalId); 987 partID, LocalId);
995 } 988 }
996 } 989 }
997 990
@@ -1008,7 +1001,7 @@ namespace OpenSim.Region.Environment.Scenes
1008 m_parts.Add(part.UUID, part); 1001 m_parts.Add(part.UUID, part);
1009 1002
1010 Vector3 axiomOldPos = new Vector3(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z); 1003 Vector3 axiomOldPos = new Vector3(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z);
1011 axiomOldPos = oldGroupRotation * axiomOldPos; 1004 axiomOldPos = oldGroupRotation*axiomOldPos;
1012 axiomOldPos += oldGroupPosition; 1005 axiomOldPos += oldGroupPosition;
1013 LLVector3 oldAbsolutePosition = new LLVector3(axiomOldPos.x, axiomOldPos.y, axiomOldPos.z); 1006 LLVector3 oldAbsolutePosition = new LLVector3(axiomOldPos.x, axiomOldPos.y, axiomOldPos.z);
1014 part.OffsetPosition = oldAbsolutePosition - AbsolutePosition; 1007 part.OffsetPosition = oldAbsolutePosition - AbsolutePosition;
@@ -1018,15 +1011,15 @@ namespace OpenSim.Region.Environment.Scenes
1018 m_rootPart.RotationOffset.Z); 1011 m_rootPart.RotationOffset.Z);
1019 1012
1020 Vector3 axiomPos = new Vector3(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z); 1013 Vector3 axiomPos = new Vector3(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z);
1021 axiomPos = axiomRootRotation.Inverse() * axiomPos; 1014 axiomPos = axiomRootRotation.Inverse()*axiomPos;
1022 part.OffsetPosition = new LLVector3(axiomPos.x, axiomPos.y, axiomPos.z); 1015 part.OffsetPosition = new LLVector3(axiomPos.x, axiomPos.y, axiomPos.z);
1023 1016
1024 Quaternion axiomPartRotation = 1017 Quaternion axiomPartRotation =
1025 new Quaternion(part.RotationOffset.W, part.RotationOffset.X, part.RotationOffset.Y, 1018 new Quaternion(part.RotationOffset.W, part.RotationOffset.X, part.RotationOffset.Y,
1026 part.RotationOffset.Z); 1019 part.RotationOffset.Z);
1027 1020
1028 axiomPartRotation = oldGroupRotation * axiomPartRotation; 1021 axiomPartRotation = oldGroupRotation*axiomPartRotation;
1029 axiomPartRotation = axiomRootRotation.Inverse() * axiomPartRotation; 1022 axiomPartRotation = axiomRootRotation.Inverse()*axiomPartRotation;
1030 part.RotationOffset = 1023 part.RotationOffset =
1031 new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w); 1024 new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w);
1032 } 1025 }
@@ -1056,12 +1049,12 @@ namespace OpenSim.Region.Environment.Scenes
1056 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; 1049 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
1057 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock(); 1050 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
1058 proper.ObjectData[0].ItemID = LLUUID.Zero; 1051 proper.ObjectData[0].ItemID = LLUUID.Zero;
1059 proper.ObjectData[0].CreationDate = (ulong)m_rootPart.CreationDate; 1052 proper.ObjectData[0].CreationDate = (ulong) m_rootPart.CreationDate;
1060 proper.ObjectData[0].CreatorID = m_rootPart.CreatorID; 1053 proper.ObjectData[0].CreatorID = m_rootPart.CreatorID;
1061 proper.ObjectData[0].FolderID = LLUUID.Zero; 1054 proper.ObjectData[0].FolderID = LLUUID.Zero;
1062 proper.ObjectData[0].FromTaskID = LLUUID.Zero; 1055 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
1063 proper.ObjectData[0].GroupID = LLUUID.Zero; 1056 proper.ObjectData[0].GroupID = LLUUID.Zero;
1064 proper.ObjectData[0].InventorySerial = (short)m_rootPart.InventorySerial; 1057 proper.ObjectData[0].InventorySerial = (short) m_rootPart.InventorySerial;
1065 proper.ObjectData[0].LastOwnerID = m_rootPart.LastOwnerID; 1058 proper.ObjectData[0].LastOwnerID = m_rootPart.LastOwnerID;
1066 proper.ObjectData[0].ObjectID = UUID; 1059 proper.ObjectData[0].ObjectID = UUID;
1067 proper.ObjectData[0].OwnerID = m_rootPart.OwnerID; 1060 proper.ObjectData[0].OwnerID = m_rootPart.OwnerID;
@@ -1155,7 +1148,7 @@ namespace OpenSim.Region.Environment.Scenes
1155 else 1148 else
1156 { 1149 {
1157 MainLog.Instance.Warn( 1150 MainLog.Instance.Warn(
1158 "SCENE", 1151 "SCENE",
1159 "Couldn't find part {0} in object group {1} ({2}) to retreive prim inventory", 1152 "Couldn't find part {0} in object group {1} ({2}) to retreive prim inventory",
1160 localID, LocalId, UUID); 1153 localID, LocalId, UUID);
1161 } 1154 }
@@ -1272,10 +1265,8 @@ namespace OpenSim.Region.Environment.Scenes
1272 public void UpdatePermissions(LLUUID AgentID, byte field, uint localID, uint mask, byte addRemTF) 1265 public void UpdatePermissions(LLUUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
1273 { 1266 {
1274 SceneObjectPart updatePart = GetChildPart(localID); 1267 SceneObjectPart updatePart = GetChildPart(localID);
1275 updatePart.UpdatePermissions(AgentID,field,localID,mask,addRemTF); 1268 updatePart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
1276 } 1269 }
1277
1278
1279 1270
1280 #endregion 1271 #endregion
1281 1272
@@ -1304,9 +1295,8 @@ namespace OpenSim.Region.Environment.Scenes
1304 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, 1295 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X,
1305 m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z), 1296 m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z),
1306 m_rootPart.PhysActor.IsPhysical); 1297 m_rootPart.PhysActor.IsPhysical);
1307 bool UsePhysics = ((m_rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); 1298 bool UsePhysics = ((m_rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0);
1308 m_rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); 1299 m_rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
1309
1310 } 1300 }
1311 } 1301 }
1312 1302
@@ -1350,11 +1340,10 @@ namespace OpenSim.Region.Environment.Scenes
1350 if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) 1340 if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
1351 { 1341 {
1352 AbsolutePosition = pos; 1342 AbsolutePosition = pos;
1353
1354 } 1343 }
1355 //we need to do a terse update even if the move wasn't allowed 1344 //we need to do a terse update even if the move wasn't allowed
1356 // so that the position is reset in the client (the object snaps back) 1345 // so that the position is reset in the client (the object snaps back)
1357 ScheduleGroupForTerseUpdate(); 1346 ScheduleGroupForTerseUpdate();
1358 } 1347 }
1359 1348
1360 /// <summary> 1349 /// <summary>
@@ -1394,7 +1383,7 @@ namespace OpenSim.Region.Environment.Scenes
1394 Quaternion partRotation = 1383 Quaternion partRotation =
1395 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, 1384 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
1396 m_rootPart.RotationOffset.Z); 1385 m_rootPart.RotationOffset.Z);
1397 axDiff = partRotation.Inverse() * axDiff; 1386 axDiff = partRotation.Inverse()*axDiff;
1398 diff.X = axDiff.x; 1387 diff.X = axDiff.x;
1399 diff.Y = axDiff.y; 1388 diff.Y = axDiff.y;
1400 diff.Z = axDiff.z; 1389 diff.Z = axDiff.z;
@@ -1496,14 +1485,14 @@ namespace OpenSim.Region.Environment.Scenes
1496 if (prim.UUID != m_rootPart.UUID) 1485 if (prim.UUID != m_rootPart.UUID)
1497 { 1486 {
1498 Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z); 1487 Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z);
1499 axPos = oldParentRot * axPos; 1488 axPos = oldParentRot*axPos;
1500 axPos = axRot.Inverse() * axPos; 1489 axPos = axRot.Inverse()*axPos;
1501 prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z); 1490 prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
1502 Quaternion primsRot = 1491 Quaternion primsRot =
1503 new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, 1492 new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y,
1504 prim.RotationOffset.Z); 1493 prim.RotationOffset.Z);
1505 Quaternion newRot = oldParentRot * primsRot; 1494 Quaternion newRot = oldParentRot*primsRot;
1506 newRot = axRot.Inverse() * newRot; 1495 newRot = axRot.Inverse()*newRot;
1507 prim.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); 1496 prim.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
1508 prim.ScheduleTerseUpdate(); 1497 prim.ScheduleTerseUpdate();
1509 } 1498 }
@@ -1736,10 +1725,10 @@ namespace OpenSim.Region.Environment.Scenes
1736 1725
1737 public override void SetText(string text, Vector3 color, double alpha) 1726 public override void SetText(string text, Vector3 color, double alpha)
1738 { 1727 {
1739 Color = Color.FromArgb(0xff - (int)(alpha * 0xff), 1728 Color = Color.FromArgb(0xff - (int) (alpha*0xff),
1740 (int)(color.x * 0xff), 1729 (int) (color.x*0xff),
1741 (int)(color.y * 0xff), 1730 (int) (color.y*0xff),
1742 (int)(color.z * 0xff)); 1731 (int) (color.z*0xff));
1743 Text = text; 1732 Text = text;
1744 } 1733 }
1745 1734
@@ -1748,4 +1737,4 @@ namespace OpenSim.Region.Environment.Scenes
1748 m_rootPart.ApplyPhysics(); 1737 m_rootPart.ApplyPhysics();
1749 } 1738 }
1750 } 1739 }
1751} 1740} \ No newline at end of file