diff options
Diffstat (limited to '')
4 files changed, 117 insertions, 62 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index f6146a9..b06788b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -103,6 +103,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
103 | private static readonly string m_getObjectPhysicsDataPath = "0101/"; | 103 | private static readonly string m_getObjectPhysicsDataPath = "0101/"; |
104 | private static readonly string m_getObjectCostPath = "0102/"; | 104 | private static readonly string m_getObjectCostPath = "0102/"; |
105 | private static readonly string m_ResourceCostSelectedPath = "0103/"; | 105 | private static readonly string m_ResourceCostSelectedPath = "0103/"; |
106 | private static readonly string m_UpdateAgentInformationPath = "0500/"; | ||
106 | 107 | ||
107 | 108 | ||
108 | // These are callbacks which will be setup by the scene so that we can update scene data when we | 109 | // These are callbacks which will be setup by the scene so that we can update scene data when we |
@@ -287,6 +288,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
287 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); | 288 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); |
288 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); | 289 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); |
289 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); | 290 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); |
291 | IRequestHandler UpdateAgentInformationHandler = new RestStreamHandler("POST", capsBase + m_UpdateAgentInformationPath, UpdateAgentInformation); | ||
292 | m_HostCapsObj.RegisterHandler("UpdateAgentInformation", UpdateAgentInformationHandler); | ||
290 | 293 | ||
291 | m_HostCapsObj.RegisterHandler( | 294 | m_HostCapsObj.RegisterHandler( |
292 | "CopyInventoryFromNotecard", | 295 | "CopyInventoryFromNotecard", |
@@ -1438,6 +1441,22 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1438 | string response = OSDParser.SerializeLLSDXmlString(resp); | 1441 | string response = OSDParser.SerializeLLSDXmlString(resp); |
1439 | return response; | 1442 | return response; |
1440 | } | 1443 | } |
1444 | |||
1445 | public string UpdateAgentInformation(string request, string path, | ||
1446 | string param, IOSHttpRequest httpRequest, | ||
1447 | IOSHttpResponse httpResponse) | ||
1448 | { | ||
1449 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | ||
1450 | OSDMap resp = new OSDMap(); | ||
1451 | |||
1452 | OSDMap accessPrefs = new OSDMap(); | ||
1453 | accessPrefs["max"] = "A"; | ||
1454 | |||
1455 | resp["access_prefs"] = accessPrefs; | ||
1456 | |||
1457 | string response = OSDParser.SerializeLLSDXmlString(resp); | ||
1458 | return response; | ||
1459 | } | ||
1441 | } | 1460 | } |
1442 | 1461 | ||
1443 | public class AssetUploader | 1462 | public class AssetUploader |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c99e37e..23006f2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2977,6 +2977,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2977 | // start the scripts again (since this is done in RezAttachments()). | 2977 | // start the scripts again (since this is done in RezAttachments()). |
2978 | // XXX: This is convoluted. | 2978 | // XXX: This is convoluted. |
2979 | sp.IsChildAgent = false; | 2979 | sp.IsChildAgent = false; |
2980 | sp.IsLoggingIn = true; | ||
2980 | 2981 | ||
2981 | if (AttachmentsModule != null) | 2982 | if (AttachmentsModule != null) |
2982 | Util.FireAndForget(delegate(object o) { AttachmentsModule.RezAttachments(sp); }); | 2983 | Util.FireAndForget(delegate(object o) { AttachmentsModule.RezAttachments(sp); }); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4504e18..a9195f7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -227,8 +227,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
227 | /// </summary> | 227 | /// </summary> |
228 | public bool LandAtTarget { get; private set; } | 228 | public bool LandAtTarget { get; private set; } |
229 | 229 | ||
230 | private bool m_followCamAuto; | ||
231 | |||
232 | private int m_movementUpdateCount; | 230 | private int m_movementUpdateCount; |
233 | private const int NumMovementsBetweenRayCast = 5; | 231 | private const int NumMovementsBetweenRayCast = 5; |
234 | 232 | ||
@@ -357,6 +355,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
357 | /// </summary> | 355 | /// </summary> |
358 | protected Vector3 m_lastCameraPosition; | 356 | protected Vector3 m_lastCameraPosition; |
359 | 357 | ||
358 | private Vector4 m_lastCameraCollisionPlane = new Vector4(0f, 0f, 0f, 1); | ||
359 | private bool m_doingCamRayCast = false; | ||
360 | |||
360 | public Vector3 CameraPosition { get; set; } | 361 | public Vector3 CameraPosition { get; set; } |
361 | 362 | ||
362 | public Quaternion CameraRotation | 363 | public Quaternion CameraRotation |
@@ -606,6 +607,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
606 | } | 607 | } |
607 | 608 | ||
608 | public bool IsChildAgent { get; set; } | 609 | public bool IsChildAgent { get; set; } |
610 | public bool IsLoggingIn { get; set; } | ||
609 | 611 | ||
610 | /// <summary> | 612 | /// <summary> |
611 | /// If the avatar is sitting, the local ID of the prim that it's sitting on. If not sitting then zero. | 613 | /// If the avatar is sitting, the local ID of the prim that it's sitting on. If not sitting then zero. |
@@ -742,6 +744,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
742 | AttachmentsSyncLock = new Object(); | 744 | AttachmentsSyncLock = new Object(); |
743 | AllowMovement = true; | 745 | AllowMovement = true; |
744 | IsChildAgent = true; | 746 | IsChildAgent = true; |
747 | IsLoggingIn = false; | ||
745 | m_sendCoarseLocationsMethod = SendCoarseLocationsDefault; | 748 | m_sendCoarseLocationsMethod = SendCoarseLocationsDefault; |
746 | Animator = new ScenePresenceAnimator(this); | 749 | Animator = new ScenePresenceAnimator(this); |
747 | PresenceType = type; | 750 | PresenceType = type; |
@@ -914,6 +917,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
914 | else | 917 | else |
915 | { | 918 | { |
916 | IsChildAgent = false; | 919 | IsChildAgent = false; |
920 | IsLoggingIn = false; | ||
917 | } | 921 | } |
918 | 922 | ||
919 | 923 | ||
@@ -1407,36 +1411,43 @@ namespace OpenSim.Region.Framework.Scenes | |||
1407 | /// <param name="collisionPoint"></param> | 1411 | /// <param name="collisionPoint"></param> |
1408 | /// <param name="localid"></param> | 1412 | /// <param name="localid"></param> |
1409 | /// <param name="distance"></param> | 1413 | /// <param name="distance"></param> |
1414 | /// | ||
1415 | |||
1416 | private void UpdateCameraCollisionPlane(Vector4 plane) | ||
1417 | { | ||
1418 | if (m_lastCameraCollisionPlane != plane) | ||
1419 | { | ||
1420 | m_lastCameraCollisionPlane = plane; | ||
1421 | ControllingClient.SendCameraConstraint(plane); | ||
1422 | } | ||
1423 | } | ||
1424 | |||
1410 | public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal) | 1425 | public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal) |
1411 | { | 1426 | { |
1412 | const float POSITION_TOLERANCE = 0.02f; | 1427 | const float POSITION_TOLERANCE = 0.02f; |
1413 | const float VELOCITY_TOLERANCE = 0.02f; | ||
1414 | const float ROTATION_TOLERANCE = 0.02f; | 1428 | const float ROTATION_TOLERANCE = 0.02f; |
1415 | 1429 | ||
1416 | if (m_followCamAuto) | 1430 | m_doingCamRayCast = false; |
1431 | if (hitYN && localid != LocalId) | ||
1417 | { | 1432 | { |
1418 | if (hitYN && localid != LocalId) | 1433 | CameraConstraintActive = true; |
1419 | { | 1434 | pNormal.X = (float)Math.Round(pNormal.X, 2); |
1420 | 1435 | pNormal.Y = (float)Math.Round(pNormal.Y, 2); | |
1421 | CameraConstraintActive = true; | 1436 | pNormal.Z = (float)Math.Round(pNormal.Z, 2); |
1422 | //m_log.DebugFormat("[RAYCASTRESULT]: {0}, {1}, {2}, {3}", hitYN, collisionPoint, localid, distance); | 1437 | pNormal.Normalize(); |
1423 | 1438 | collisionPoint.X = (float)Math.Round(collisionPoint.X, 1); | |
1424 | Vector3 normal = Vector3.Normalize(new Vector3(0f, 0f, collisionPoint.Z) - collisionPoint); | 1439 | collisionPoint.Y = (float)Math.Round(collisionPoint.Y, 1); |
1425 | ControllingClient.SendCameraConstraint(new Vector4(normal.X, normal.Y, normal.Z, -1 * Vector3.Distance(new Vector3(0,0,collisionPoint.Z),collisionPoint))); | 1440 | collisionPoint.Z = (float)Math.Round(collisionPoint.Z, 1); |
1426 | } | 1441 | |
1427 | else | 1442 | Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z, Vector3.Dot(collisionPoint, pNormal)); |
1428 | { | 1443 | UpdateCameraCollisionPlane(plane); |
1429 | if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || | 1444 | } |
1430 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | 1445 | else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || |
1431 | !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)) | 1446 | !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)) |
1432 | { | 1447 | { |
1433 | if (CameraConstraintActive) | 1448 | Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -9000f); // not right... |
1434 | { | 1449 | UpdateCameraCollisionPlane(plane); |
1435 | ControllingClient.SendCameraConstraint(new Vector4(0f, 0.5f, 0.9f, -3000f)); | 1450 | CameraConstraintActive = false; |
1436 | CameraConstraintActive = false; | ||
1437 | } | ||
1438 | } | ||
1439 | } | ||
1440 | } | 1451 | } |
1441 | } | 1452 | } |
1442 | 1453 | ||
@@ -1511,12 +1522,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1511 | // DrawDistance = agentData.Far; | 1522 | // DrawDistance = agentData.Far; |
1512 | DrawDistance = Scene.DefaultDrawDistance; | 1523 | DrawDistance = Scene.DefaultDrawDistance; |
1513 | 1524 | ||
1514 | // Check if Client has camera in 'follow cam' or 'build' mode. | ||
1515 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); | ||
1516 | |||
1517 | m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) | ||
1518 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; | ||
1519 | |||
1520 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; | 1525 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; |
1521 | m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; | 1526 | m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; |
1522 | 1527 | ||
@@ -1536,24 +1541,38 @@ namespace OpenSim.Region.Framework.Scenes | |||
1536 | StandUp(); | 1541 | StandUp(); |
1537 | } | 1542 | } |
1538 | 1543 | ||
1539 | //m_log.DebugFormat("[FollowCam]: {0}", m_followCamAuto); | ||
1540 | // Raycast from the avatar's head to the camera to see if there's anything blocking the view | 1544 | // Raycast from the avatar's head to the camera to see if there's anything blocking the view |
1541 | if ((m_movementUpdateCount % NumMovementsBetweenRayCast) == 0 && m_scene.PhysicsScene.SupportsRayCast()) | 1545 | // this exclude checks may not be complete |
1546 | |||
1547 | if (m_movementUpdateCount % NumMovementsBetweenRayCast == 0 && m_scene.PhysicsScene.SupportsRayCast()) | ||
1542 | { | 1548 | { |
1543 | if (m_followCamAuto) | 1549 | if (!m_doingCamRayCast && !m_mouseLook && ParentID == 0) |
1544 | { | 1550 | { |
1545 | // Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT; | 1551 | Vector3 posAdjusted = AbsolutePosition; |
1546 | // m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback); | 1552 | // posAdjusted.Z += 0.5f * Appearance.AvatarSize.Z - 0.5f; |
1547 | 1553 | posAdjusted.Z += 1.0f; // viewer current camera focus point | |
1548 | Vector3 posAdjusted = AbsolutePosition + HEAD_ADJUSTMENT; | 1554 | Vector3 tocam = CameraPosition - posAdjusted; |
1549 | Vector3 distTocam = CameraPosition - posAdjusted; | 1555 | tocam.X = (float)Math.Round(tocam.X, 1); |
1550 | float distTocamlen = distTocam.Length(); | 1556 | tocam.Y = (float)Math.Round(tocam.Y, 1); |
1551 | if (distTocamlen > 0) | 1557 | tocam.Z = (float)Math.Round(tocam.Z, 1); |
1558 | |||
1559 | float distTocamlen = tocam.Length(); | ||
1560 | if (distTocamlen > 0.3f) | ||
1552 | { | 1561 | { |
1553 | distTocam *= 1.0f / distTocamlen; | 1562 | tocam *= (1.0f / distTocamlen); |
1554 | m_scene.PhysicsScene.RaycastWorld(posAdjusted, distTocam, distTocamlen + 0.3f, RayCastCameraCallback); | 1563 | posAdjusted.X = (float)Math.Round(posAdjusted.X, 1); |
1564 | posAdjusted.Y = (float)Math.Round(posAdjusted.Y, 1); | ||
1565 | posAdjusted.Z = (float)Math.Round(posAdjusted.Z, 1); | ||
1566 | |||
1567 | m_doingCamRayCast = true; | ||
1568 | m_scene.PhysicsScene.RaycastWorld(posAdjusted, tocam, distTocamlen + 1.0f, RayCastCameraCallback); | ||
1555 | } | 1569 | } |
1556 | 1570 | } | |
1571 | else if (CameraConstraintActive && (m_mouseLook || ParentID != 0)) | ||
1572 | { | ||
1573 | Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -10000f); // not right... | ||
1574 | UpdateCameraCollisionPlane(plane); | ||
1575 | CameraConstraintActive = false; | ||
1557 | } | 1576 | } |
1558 | } | 1577 | } |
1559 | 1578 | ||
@@ -2525,13 +2544,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2525 | // NOTE: Velocity is not the same as m_velocity. Velocity will attempt to | 2544 | // NOTE: Velocity is not the same as m_velocity. Velocity will attempt to |
2526 | // grab the latest PhysicsActor velocity, whereas m_velocity is often | 2545 | // grab the latest PhysicsActor velocity, whereas m_velocity is often |
2527 | // storing a requested force instead of an actual traveling velocity | 2546 | // storing a requested force instead of an actual traveling velocity |
2528 | if (Appearance.AvatarSize != m_lastSize) | 2547 | if (Appearance.AvatarSize != m_lastSize && !IsLoggingIn) |
2529 | { | ||
2530 | m_lastSize = Appearance.AvatarSize; | ||
2531 | SendAvatarDataToAllAgents(); | 2548 | SendAvatarDataToAllAgents(); |
2532 | } | ||
2533 | 2549 | ||
2534 | else if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | 2550 | if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || |
2535 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | 2551 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || |
2536 | !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) | 2552 | !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) |
2537 | { | 2553 | { |
@@ -2722,6 +2738,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2722 | return; | 2738 | return; |
2723 | } | 2739 | } |
2724 | 2740 | ||
2741 | m_lastSize = Appearance.AvatarSize; | ||
2742 | |||
2725 | int count = 0; | 2743 | int count = 0; |
2726 | m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) | 2744 | m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) |
2727 | { | 2745 | { |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs index 6e9281b..7fe3109 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs | |||
@@ -173,8 +173,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
173 | d.GeomRaySetClosestHit(ray, closestHit); | 173 | d.GeomRaySetClosestHit(ray, closestHit); |
174 | 174 | ||
175 | if (req.callbackMethod is RaycastCallback) | 175 | if (req.callbackMethod is RaycastCallback) |
176 | { | ||
176 | // if we only want one get only one per Collision pair saving memory | 177 | // if we only want one get only one per Collision pair saving memory |
177 | CurrentRayFilter |= RayFilterFlags.ClosestHit; | 178 | CurrentRayFilter |= RayFilterFlags.ClosestHit; |
179 | d.GeomRaySetClosestHit(ray, 1); | ||
180 | } | ||
181 | else | ||
182 | d.GeomRaySetClosestHit(ray, closestHit); | ||
178 | } | 183 | } |
179 | 184 | ||
180 | if ((CurrentRayFilter & RayFilterFlags.ContactsUnImportant) != 0) | 185 | if ((CurrentRayFilter & RayFilterFlags.ContactsUnImportant) != 0) |
@@ -555,10 +560,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
555 | 560 | ||
556 | ContactResult collisionresult = new ContactResult(); | 561 | ContactResult collisionresult = new ContactResult(); |
557 | collisionresult.ConsumerID = ID; | 562 | collisionresult.ConsumerID = ID; |
558 | collisionresult.Pos = new Vector3(curcontact.pos.X, curcontact.pos.Y, curcontact.pos.Z); | 563 | collisionresult.Pos.X = curcontact.pos.X; |
564 | collisionresult.Pos.Y = curcontact.pos.Y; | ||
565 | collisionresult.Pos.Z = curcontact.pos.Z; | ||
559 | collisionresult.Depth = curcontact.depth; | 566 | collisionresult.Depth = curcontact.depth; |
560 | collisionresult.Normal = new Vector3(curcontact.normal.X, curcontact.normal.Y, | 567 | collisionresult.Normal.X = curcontact.normal.X; |
561 | curcontact.normal.Z); | 568 | collisionresult.Normal.Y = curcontact.normal.Y; |
569 | collisionresult.Normal.Z = curcontact.normal.Z; | ||
562 | lock (m_contactResults) | 570 | lock (m_contactResults) |
563 | { | 571 | { |
564 | m_contactResults.Add(collisionresult); | 572 | m_contactResults.Add(collisionresult); |
@@ -581,10 +589,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
581 | 589 | ||
582 | if (curcontact.depth < collisionresult.Depth) | 590 | if (curcontact.depth < collisionresult.Depth) |
583 | { | 591 | { |
584 | collisionresult.Pos = new Vector3(curcontact.pos.X, curcontact.pos.Y, curcontact.pos.Z); | 592 | collisionresult.Pos.X = curcontact.pos.X; |
593 | collisionresult.Pos.Y = curcontact.pos.Y; | ||
594 | collisionresult.Pos.Z = curcontact.pos.Z; | ||
585 | collisionresult.Depth = curcontact.depth; | 595 | collisionresult.Depth = curcontact.depth; |
586 | collisionresult.Normal = new Vector3(curcontact.normal.X, curcontact.normal.Y, | 596 | collisionresult.Normal.X = curcontact.normal.X; |
587 | curcontact.normal.Z); | 597 | collisionresult.Normal.Y = curcontact.normal.Y; |
598 | collisionresult.Normal.Z = curcontact.normal.Z; | ||
588 | } | 599 | } |
589 | } | 600 | } |
590 | 601 | ||
@@ -699,10 +710,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
699 | 710 | ||
700 | ContactResult collisionresult = new ContactResult(); | 711 | ContactResult collisionresult = new ContactResult(); |
701 | collisionresult.ConsumerID = ID; | 712 | collisionresult.ConsumerID = ID; |
702 | collisionresult.Pos = new Vector3(curcontact.pos.X, curcontact.pos.Y, curcontact.pos.Z); | 713 | collisionresult.Pos.X = curcontact.pos.X; |
714 | collisionresult.Pos.Y = curcontact.pos.Y; | ||
715 | collisionresult.Pos.Z = curcontact.pos.Z; | ||
703 | collisionresult.Depth = curcontact.depth; | 716 | collisionresult.Depth = curcontact.depth; |
704 | collisionresult.Normal = new Vector3(curcontact.normal.X, curcontact.normal.Y, | 717 | collisionresult.Normal.X = curcontact.normal.X; |
705 | curcontact.normal.Z); | 718 | collisionresult.Normal.Y = curcontact.normal.Y; |
719 | collisionresult.Normal.Z = curcontact.normal.Z; | ||
706 | lock (m_contactResults) | 720 | lock (m_contactResults) |
707 | { | 721 | { |
708 | m_contactResults.Add(collisionresult); | 722 | m_contactResults.Add(collisionresult); |
@@ -725,10 +739,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
725 | 739 | ||
726 | if (curcontact.depth < collisionresult.Depth) | 740 | if (curcontact.depth < collisionresult.Depth) |
727 | { | 741 | { |
728 | collisionresult.Pos = new Vector3(curcontact.pos.X, curcontact.pos.Y, curcontact.pos.Z); | 742 | collisionresult.Pos.X = curcontact.pos.X; |
743 | collisionresult.Pos.Y = curcontact.pos.Y; | ||
744 | collisionresult.Pos.Z = curcontact.pos.Z; | ||
729 | collisionresult.Depth = curcontact.depth; | 745 | collisionresult.Depth = curcontact.depth; |
730 | collisionresult.Normal = new Vector3(curcontact.normal.X, curcontact.normal.Y, | 746 | collisionresult.Normal.X = curcontact.normal.X; |
731 | curcontact.normal.Z); | 747 | collisionresult.Normal.Y = curcontact.normal.Y; |
748 | collisionresult.Normal.Z = curcontact.normal.Z; | ||
732 | } | 749 | } |
733 | } | 750 | } |
734 | 751 | ||