diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/ComplexObject.cs | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs index 16636e0..c8c4624 100644 --- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs | |||
@@ -25,7 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using libsecondlife; | 28 | using OpenMetaverse; |
29 | using OpenSim.Framework; | 29 | using OpenSim.Framework; |
30 | using OpenSim.Region.Environment.Scenes; | 30 | using OpenSim.Region.Environment.Scenes; |
31 | 31 | ||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
33 | { | 33 | { |
34 | public class ComplexObject : SceneObjectGroup | 34 | public class ComplexObject : SceneObjectGroup |
35 | { | 35 | { |
36 | private readonly LLQuaternion m_rotationDirection; | 36 | private readonly Quaternion m_rotationDirection; |
37 | 37 | ||
38 | protected override bool InSceneBackup | 38 | protected override bool InSceneBackup |
39 | { | 39 | { |
@@ -45,21 +45,21 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
45 | 45 | ||
46 | private class RotatingWheel : SceneObjectPart | 46 | private class RotatingWheel : SceneObjectPart |
47 | { | 47 | { |
48 | private readonly LLQuaternion m_rotationDirection; | 48 | private readonly Quaternion m_rotationDirection; |
49 | 49 | ||
50 | public RotatingWheel() | 50 | public RotatingWheel() |
51 | { | 51 | { |
52 | } | 52 | } |
53 | 53 | ||
54 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, | 54 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, UUID ownerID, uint localID, |
55 | LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) | 55 | Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection) |
56 | : base( | 56 | : base( |
57 | regionHandle, parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition | 57 | regionHandle, parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition |
58 | ) | 58 | ) |
59 | { | 59 | { |
60 | m_rotationDirection = rotationDirection; | 60 | m_rotationDirection = rotationDirection; |
61 | 61 | ||
62 | Flags |= LLObject.ObjectFlags.Touch; | 62 | Flags |= PrimFlags.Touch; |
63 | } | 63 | } |
64 | 64 | ||
65 | public override void UpdateMovement() | 65 | public override void UpdateMovement() |
@@ -79,55 +79,55 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
79 | { | 79 | { |
80 | } | 80 | } |
81 | 81 | ||
82 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos) | 82 | public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos) |
83 | : base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) | 83 | : base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) |
84 | { | 84 | { |
85 | m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); | 85 | m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f); |
86 | 86 | ||
87 | AddPart( | 87 | AddPart( |
88 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), | 88 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, 0.75f), |
89 | new LLQuaternion(0.05f, 0, 0))); | 89 | new Quaternion(0.05f, 0, 0))); |
90 | AddPart( | 90 | AddPart( |
91 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), | 91 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, -0.75f), |
92 | new LLQuaternion(-0.05f, 0, 0))); | 92 | new Quaternion(-0.05f, 0, 0))); |
93 | 93 | ||
94 | AddPart( | 94 | AddPart( |
95 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f, 0), | 95 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0.75f, 0), |
96 | new LLQuaternion(0.5f, 0, 0.05f))); | 96 | new Quaternion(0.5f, 0, 0.05f))); |
97 | AddPart( | 97 | AddPart( |
98 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f, 0), | 98 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, -0.75f, 0), |
99 | new LLQuaternion(-0.5f, 0, -0.05f))); | 99 | new Quaternion(-0.5f, 0, -0.05f))); |
100 | 100 | ||
101 | AddPart( | 101 | AddPart( |
102 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), | 102 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0.75f, 0, 0), |
103 | new LLQuaternion(0, 0.5f, 0.05f))); | 103 | new Quaternion(0, 0.5f, 0.05f))); |
104 | AddPart( | 104 | AddPart( |
105 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), | 105 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(-0.75f, 0, 0), |
106 | new LLQuaternion(0, -0.5f, -0.05f))); | 106 | new Quaternion(0, -0.5f, -0.05f))); |
107 | 107 | ||
108 | RootPart.Flags |= LLObject.ObjectFlags.Touch; | 108 | RootPart.Flags |= PrimFlags.Touch; |
109 | 109 | ||
110 | UpdateParentIDs(); | 110 | UpdateParentIDs(); |
111 | } | 111 | } |
112 | 112 | ||
113 | public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) | 113 | public override void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient) |
114 | { | 114 | { |
115 | m_parts.Remove(part.UUID); | 115 | m_parts.Remove(part.UUID); |
116 | 116 | ||
117 | remoteClient.SendKillObject(m_regionHandle, part.LocalId); | 117 | remoteClient.SendKiPrimitive(m_regionHandle, part.LocalId); |
118 | remoteClient.AddMoney(1); | 118 | remoteClient.AddMoney(1); |
119 | remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); | 119 | remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); |
120 | } | 120 | } |
121 | 121 | ||
122 | public override void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) | 122 | public override void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient) |
123 | { | 123 | { |
124 | if (m_parts.Count == 1) | 124 | if (m_parts.Count == 1) |
125 | { | 125 | { |
126 | m_parts.Remove(m_rootPart.UUID); | 126 | m_parts.Remove(m_rootPart.UUID); |
127 | m_scene.DeleteSceneObject(this); | 127 | m_scene.DeleteSceneObject(this); |
128 | remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId); | 128 | remoteClient.SendKiPrimitive(m_regionHandle, m_rootPart.LocalId); |
129 | remoteClient.AddMoney(50); | 129 | remoteClient.AddMoney(50); |
130 | remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); | 130 | remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); |
131 | } | 131 | } |
132 | } | 132 | } |
133 | } | 133 | } |