diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cd28434..3d4490a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1142,7 +1142,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1142 | /// <param name="collisionPoint"></param> | 1142 | /// <param name="collisionPoint"></param> |
1143 | /// <param name="localid"></param> | 1143 | /// <param name="localid"></param> |
1144 | /// <param name="distance"></param> | 1144 | /// <param name="distance"></param> |
1145 | public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance) | 1145 | public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal) |
1146 | { | 1146 | { |
1147 | const float POSITION_TOLERANCE = 0.02f; | 1147 | const float POSITION_TOLERANCE = 0.02f; |
1148 | const float VELOCITY_TOLERANCE = 0.02f; | 1148 | const float VELOCITY_TOLERANCE = 0.02f; |
@@ -1740,11 +1740,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1740 | UUID avOnTargetAlready = part.GetAvatarOnSitTarget(); | 1740 | UUID avOnTargetAlready = part.GetAvatarOnSitTarget(); |
1741 | 1741 | ||
1742 | bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero)); | 1742 | bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero)); |
1743 | // bool SitTargetisSet = | 1743 | bool SitTargetisSet = |
1744 | // (!(avSitOffSet.X == 0f && avSitOffSet.Y == 0f && avSitOffSet.Z == 0f && avSitOrientation.W == 0f && | 1744 | (!(avSitOffSet.X == 0f && avSitOffSet.Y == 0f && avSitOffSet.Z == 0f && |
1745 | // avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 1f)); | 1745 | ( |
1746 | 1746 | avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 0f && avSitOrientation.W == 1f // Valid Zero Rotation quaternion | |
1747 | bool SitTargetisSet = ((Vector3.Zero != avSitOffSet) || (Quaternion.Identity != avSitOrientation)); | 1747 | || avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 1f && avSitOrientation.W == 0f // W-Z Mapping was invalid at one point |
1748 | || avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 0f && avSitOrientation.W == 0f // Invalid Quaternion | ||
1749 | ) | ||
1750 | )); | ||
1748 | 1751 | ||
1749 | //Console.WriteLine("SendSitResponse offset=" + offset + " UnOccup=" + SitTargetUnOccupied + | 1752 | //Console.WriteLine("SendSitResponse offset=" + offset + " UnOccup=" + SitTargetUnOccupied + |
1750 | // " TargSet=" + SitTargetisSet); | 1753 | // " TargSet=" + SitTargetisSet); |
@@ -1826,7 +1829,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1826 | StandUp(); | 1829 | StandUp(); |
1827 | } | 1830 | } |
1828 | m_nextSitAnimation = "SIT"; | 1831 | m_nextSitAnimation = "SIT"; |
1829 | 1832 | ||
1830 | //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); | 1833 | //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); |
1831 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); | 1834 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); |
1832 | 1835 | ||
@@ -1838,12 +1841,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
1838 | } | 1841 | } |
1839 | m_requestedSitTargetID = part.LocalId; | 1842 | m_requestedSitTargetID = part.LocalId; |
1840 | //m_requestedSitOffset = offset; | 1843 | //m_requestedSitOffset = offset; |
1844 | //offset.X += part.Scale.X;// *offset.X; | ||
1845 | //offset.Y += part.Scale.Y;// * offset.Y; | ||
1846 | //offset.Z += part.Scale.Z;// * offset.Z; | ||
1847 | //m_requestedSitOffset = offset; | ||
1848 | m_log.DebugFormat("[SIT]: Client requested Sit Position: {0}", offset); | ||
1841 | } | 1849 | } |
1842 | else | 1850 | else |
1843 | { | 1851 | { |
1844 | 1852 | ||
1845 | m_log.Warn("Sit requested on unknown object: " + targetID.ToString()); | 1853 | m_log.Warn("Sit requested on unknown object: " + targetID.ToString()); |
1846 | } | 1854 | } |
1855 | |||
1856 | if (m_scene.PhysicsScene.SupportsRayCast()) | ||
1857 | { | ||
1858 | //m_scene.PhysicsScene.RaycastWorld(Vector3.Zero,Vector3.Zero, 0.01f,new RaycastCallback()); | ||
1859 | } | ||
1860 | |||
1847 | SendSitResponse(remoteClient, targetID, offset); | 1861 | SendSitResponse(remoteClient, targetID, offset); |
1848 | } | 1862 | } |
1849 | 1863 | ||