aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-18 11:09:43 -0400
committerTeravus Ovares (Dan Olivares)2009-08-18 11:09:43 -0400
commit311b51a1843f43daa7796a46961b65fe702e1b85 (patch)
tree756554b330c8bdd970f319c3af0327efb9017673 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parent* Some Physics Scene Changes to prepare for larger regions (diff)
parentFixes mantis #4020 (http://opensimulator.org/mantis/view.php?id=4020) (diff)
downloadopensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.zip
opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.tar.gz
opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.tar.bz2
opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.tar.xz
*remove conflicts
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs41
1 files changed, 21 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 0e0999a..3007598 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -442,7 +442,7 @@ namespace OpenSim.Region.Framework.Scenes
442 if (group != null) 442 if (group != null)
443 { 443 {
444 //group.DetachToGround(); 444 //group.DetachToGround();
445 m_parentScene.DetachSingleAttachmentToInv(group.GetFromAssetID(), remoteClient); 445 m_parentScene.DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient);
446 } 446 }
447 } 447 }
448 448
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Framework.Scenes
489 // Calls attach with a Zero position 489 // Calls attach with a Zero position
490 // 490 //
491 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false); 491 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false);
492 m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromAssetID(), remoteClient.AgentId); 492 m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId);
493 } 493 }
494 494
495 public SceneObjectGroup RezSingleAttachment( 495 public SceneObjectGroup RezSingleAttachment(
@@ -536,14 +536,14 @@ namespace OpenSim.Region.Framework.Scenes
536 if (entity is SceneObjectGroup) 536 if (entity is SceneObjectGroup)
537 { 537 {
538 group = (SceneObjectGroup)entity; 538 group = (SceneObjectGroup)entity;
539 if (group.GetFromAssetID() == itemID) 539 if (group.GetFromItemID() == itemID)
540 { 540 {
541 m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); 541 m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero);
542 group.DetachToInventoryPrep(); 542 group.DetachToInventoryPrep();
543 m_log.Debug("[DETACH]: Saving attachpoint: " + 543 m_log.Debug("[DETACH]: Saving attachpoint: " +
544 ((uint)group.GetAttachmentPoint()).ToString()); 544 ((uint)group.GetAttachmentPoint()).ToString());
545 m_parentScene.updateKnownAsset(remoteClient, group, 545 m_parentScene.UpdateKnownItem(remoteClient, group,
546 group.GetFromAssetID(), group.OwnerID); 546 group.GetFromItemID(), group.OwnerID);
547 m_parentScene.DeleteSceneObject(group, false); 547 m_parentScene.DeleteSceneObject(group, false);
548 return; 548 return;
549 } 549 }
@@ -572,7 +572,7 @@ namespace OpenSim.Region.Framework.Scenes
572 { 572 {
573 // Check object for stored attachment point 573 // Check object for stored attachment point
574 AttachmentPt = (uint)group.GetAttachmentPoint(); 574 AttachmentPt = (uint)group.GetAttachmentPoint();
575 } 575 }
576 576
577 // if we still didn't find a suitable attachment point....... 577 // if we still didn't find a suitable attachment point.......
578 if (AttachmentPt == 0) 578 if (AttachmentPt == 0)
@@ -580,21 +580,23 @@ namespace OpenSim.Region.Framework.Scenes
580 // Stick it on left hand with Zero Offset from the attachment point. 580 // Stick it on left hand with Zero Offset from the attachment point.
581 AttachmentPt = (uint)AttachmentPoint.LeftHand; 581 AttachmentPt = (uint)AttachmentPoint.LeftHand;
582 attachPos = Vector3.Zero; 582 attachPos = Vector3.Zero;
583
583 } 584 }
584 585
586
585 group.SetAttachmentPoint(Convert.ToByte(AttachmentPt)); 587 group.SetAttachmentPoint(Convert.ToByte(AttachmentPt));
586 group.AbsolutePosition = attachPos; 588 group.AbsolutePosition = attachPos;
587 589
588 // Saves and gets assetID 590 // Saves and gets itemID
589 UUID itemId; 591 UUID itemId;
590 592
591 if (group.GetFromAssetID() == UUID.Zero) 593 if (group.GetFromItemID() == UUID.Zero)
592 { 594 {
593 m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId); 595 m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
594 } 596 }
595 else 597 else
596 { 598 {
597 itemId = group.GetFromAssetID(); 599 itemId = group.GetFromItemID();
598 } 600 }
599 601
600 m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); 602 m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
@@ -611,6 +613,8 @@ namespace OpenSim.Region.Framework.Scenes
611 remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false); 613 remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false);
612 } 614 }
613 } 615 }
616 else
617 m_log.DebugFormat("[SCENE GRAPH]: AttachObject found no such scene object {0}", objectLocalID);
614 } 618 }
615 619
616 protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) 620 protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance)
@@ -928,25 +932,22 @@ namespace OpenSim.Region.Framework.Scenes
928 { 932 {
929 // Primitive Ray Tracing 933 // Primitive Ray Tracing
930 float closestDistance = 280f; 934 float closestDistance = 280f;
931 EntityIntersection returnResult = new EntityIntersection(); 935 EntityIntersection result = new EntityIntersection();
932 List<EntityBase> EntityList = GetEntities(); 936 List<EntityBase> EntityList = GetEntities();
933 foreach (EntityBase ent in EntityList) 937 foreach (EntityBase ent in EntityList)
934 { 938 {
935 if (ent is SceneObjectGroup) 939 if (ent is SceneObjectGroup)
936 { 940 {
937 SceneObjectGroup reportingG = (SceneObjectGroup)ent; 941 SceneObjectGroup reportingG = (SceneObjectGroup)ent;
938 EntityIntersection result = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters); 942 EntityIntersection inter = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters);
939 if (result.HitTF) 943 if (inter.HitTF && inter.distance < closestDistance)
940 { 944 {
941 if (result.distance < closestDistance) 945 closestDistance = inter.distance;
942 { 946 result = inter;
943 closestDistance = result.distance;
944 returnResult = result;
945 }
946 } 947 }
947 } 948 }
948 } 949 }
949 return returnResult; 950 return result;
950 } 951 }
951 952
952 /// <summary> 953 /// <summary>
@@ -979,7 +980,7 @@ namespace OpenSim.Region.Framework.Scenes
979 { 980 {
980 foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) 981 foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts())
981 { 982 {
982 if (p.Name==name) 983 if (p.Name == name)
983 { 984 {
984 return p; 985 return p;
985 } 986 }
@@ -1307,7 +1308,7 @@ namespace OpenSim.Region.Framework.Scenes
1307 group.UpdateGroupPosition(pos); 1308 group.UpdateGroupPosition(pos);
1308 group.RootPart.IsAttachment = false; 1309 group.RootPart.IsAttachment = false;
1309 group.AbsolutePosition = group.RootPart.AttachedPos; 1310 group.AbsolutePosition = group.RootPart.AttachedPos;
1310 m_parentScene.updateKnownAsset(remoteClient, group, group.GetFromAssetID(), group.OwnerID); 1311 m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromItemID(), group.OwnerID);
1311 group.SetAttachmentPoint(attachmentPoint); 1312 group.SetAttachmentPoint(attachmentPoint);
1312 1313
1313 } 1314 }