diff options
author | Melanie | 2011-10-25 02:26:56 +0100 |
---|---|---|
committer | Melanie | 2011-10-25 02:26:56 +0100 |
commit | e2de57ca29116fd1dae77065104d7f431da711fc (patch) | |
tree | ad5ed1720690812044cbfc7fb6072283b4e144c7 /OpenSim/Region/Framework | |
parent | Merge commit '730460169f2a45e934b42b2464f7c7472f7fac48' into bigmerge (diff) | |
parent | Implement osNpcSit(). This is still in development so don't trust it (diff) | |
download | opensim-SC-e2de57ca29116fd1dae77065104d7f431da711fc.zip opensim-SC-e2de57ca29116fd1dae77065104d7f431da711fc.tar.gz opensim-SC-e2de57ca29116fd1dae77065104d7f431da711fc.tar.bz2 opensim-SC-e2de57ca29116fd1dae77065104d7f431da711fc.tar.xz |
Merge commit '0c041ce12f393367e2754e88d9b8dad5e45f88c4' into bigmerge
Conflicts:
OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/Framework')
4 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index 5e5c4a1..9dd8c79 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs | |||
@@ -95,6 +95,15 @@ namespace OpenSim.Region.Framework.Interfaces | |||
95 | bool Say(UUID agentID, Scene scene, string text); | 95 | bool Say(UUID agentID, Scene scene, string text); |
96 | 96 | ||
97 | /// <summary> | 97 | /// <summary> |
98 | /// Sit the NPC. | ||
99 | /// </summary> | ||
100 | /// <param name="agentID"></param> | ||
101 | /// <param name="partID"></param> | ||
102 | /// <param name="scene"></param> | ||
103 | /// <returns>true if the sit succeeded, false if not</returns> | ||
104 | bool Sit(UUID agentID, UUID partID, Scene scene); | ||
105 | |||
106 | /// <summary> | ||
98 | /// Delete an NPC. | 107 | /// Delete an NPC. |
99 | /// </summary> | 108 | /// </summary> |
100 | /// <param name="agentID">The UUID of the NPC</param> | 109 | /// <param name="agentID">The UUID of the NPC</param> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fae1618..5381f63 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -493,8 +493,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
493 | { | 493 | { |
494 | foreach (ScenePresence av in m_linkedAvatars) | 494 | foreach (ScenePresence av in m_linkedAvatars) |
495 | { | 495 | { |
496 | SceneObjectPart p; | 496 | SceneObjectPart p = m_scene.GetSceneObjectPart(av.ParentID); |
497 | if (m_parts.TryGetValue(av.LinkedPrim, out p)) | 497 | if (m_parts.TryGetValue(p.UUID, out p)) |
498 | { | 498 | { |
499 | Vector3 offset = p.GetWorldPosition() - av.ParentPosition; | 499 | Vector3 offset = p.GetWorldPosition() - av.ParentPosition; |
500 | av.AbsolutePosition += offset; | 500 | av.AbsolutePosition += offset; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index d7435c6..89b98af 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -776,7 +776,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
776 | List<ScenePresence> avs = ParentGroup.GetLinkedAvatars(); | 776 | List<ScenePresence> avs = ParentGroup.GetLinkedAvatars(); |
777 | foreach (ScenePresence av in avs) | 777 | foreach (ScenePresence av in avs) |
778 | { | 778 | { |
779 | if (av.LinkedPrim == m_uuid) | 779 | if (av.ParentID == m_localId) |
780 | { | 780 | { |
781 | Vector3 offset = (m_offsetPosition - oldpos); | 781 | Vector3 offset = (m_offsetPosition - oldpos); |
782 | av.AbsolutePosition += offset; | 782 | av.AbsolutePosition += offset; |
@@ -1260,14 +1260,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1260 | set { m_occupied = value; } | 1260 | set { m_occupied = value; } |
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | |||
1264 | public UUID SitTargetAvatar | 1263 | public UUID SitTargetAvatar |
1265 | { | 1264 | { |
1266 | get { return m_sitTargetAvatar; } | 1265 | get { return m_sitTargetAvatar; } |
1267 | set { m_sitTargetAvatar = value; } | 1266 | set { m_sitTargetAvatar = value; } |
1268 | } | 1267 | } |
1269 | 1268 | ||
1270 | |||
1271 | public virtual UUID RegionID | 1269 | public virtual UUID RegionID |
1272 | { | 1270 | { |
1273 | get | 1271 | get |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index bdfad40..bb65322 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -671,19 +671,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
671 | private uint m_parentID; | 671 | private uint m_parentID; |
672 | 672 | ||
673 | 673 | ||
674 | private UUID m_linkedPrim; | ||
675 | |||
676 | public uint ParentID | 674 | public uint ParentID |
677 | { | 675 | { |
678 | get { return m_parentID; } | 676 | get { return m_parentID; } |
679 | set { m_parentID = value; } | 677 | set { m_parentID = value; } |
680 | } | 678 | } |
681 | 679 | ||
682 | public UUID LinkedPrim | ||
683 | { | ||
684 | get { return m_linkedPrim; } | ||
685 | set { m_linkedPrim = value; } | ||
686 | } | ||
687 | 680 | ||
688 | public float Health | 681 | public float Health |
689 | { | 682 | { |
@@ -2056,7 +2049,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2056 | 2049 | ||
2057 | m_parentPosition = Vector3.Zero; | 2050 | m_parentPosition = Vector3.Zero; |
2058 | m_parentID = 0; | 2051 | m_parentID = 0; |
2059 | m_linkedPrim = UUID.Zero; | ||
2060 | m_offsetRotation = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f); | 2052 | m_offsetRotation = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f); |
2061 | SendAvatarDataToAllAgents(); | 2053 | SendAvatarDataToAllAgents(); |
2062 | m_requestedSitTargetID = 0; | 2054 | m_requestedSitTargetID = 0; |
@@ -2513,7 +2505,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2513 | } | 2505 | } |
2514 | */ | 2506 | */ |
2515 | 2507 | ||
2516 | |||
2517 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) | 2508 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) |
2518 | { | 2509 | { |
2519 | if (!String.IsNullOrEmpty(m_nextSitAnimation)) | 2510 | if (!String.IsNullOrEmpty(m_nextSitAnimation)) |
@@ -2616,7 +2607,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2616 | m_parentID = m_requestedSitTargetID; | 2607 | m_parentID = m_requestedSitTargetID; |
2617 | } | 2608 | } |
2618 | 2609 | ||
2619 | m_linkedPrim = part.UUID; | ||
2620 | if (part.GetAvatarOnSitTarget() != UUID) | 2610 | if (part.GetAvatarOnSitTarget() != UUID) |
2621 | { | 2611 | { |
2622 | m_offsetRotation = m_offsetRotation / part.RotationOffset; | 2612 | m_offsetRotation = m_offsetRotation / part.RotationOffset; |