diff options
Diffstat (limited to 'OpenSim/Region/Examples/SimpleModule/ComplexObject.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/ComplexObject.cs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs index 3b776e7..9ad4897 100644 --- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs | |||
@@ -51,11 +51,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
51 | { | 51 | { |
52 | } | 52 | } |
53 | 53 | ||
54 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, UUID ownerID, uint localID, | 54 | public RotatingWheel(SceneObjectGroup parent, UUID ownerID, uint localID, |
55 | Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection) | 55 | Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection) |
56 | : base( | 56 | : base(parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition) |
57 | regionHandle, parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition | ||
58 | ) | ||
59 | { | 57 | { |
60 | m_rotationDirection = rotationDirection; | 58 | m_rotationDirection = rotationDirection; |
61 | 59 | ||
@@ -64,13 +62,13 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
64 | 62 | ||
65 | public override void UpdateMovement() | 63 | public override void UpdateMovement() |
66 | { | 64 | { |
67 | UpdateRotation(RotationOffset*m_rotationDirection); | 65 | UpdateRotation(RotationOffset * m_rotationDirection); |
68 | } | 66 | } |
69 | } | 67 | } |
70 | 68 | ||
71 | public override void UpdateMovement() | 69 | public override void UpdateMovement() |
72 | { | 70 | { |
73 | UpdateGroupRotation(GroupRotation*m_rotationDirection); | 71 | UpdateGroupRotation(GroupRotation * m_rotationDirection); |
74 | 72 | ||
75 | base.UpdateMovement(); | 73 | base.UpdateMovement(); |
76 | } | 74 | } |
@@ -80,29 +78,29 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
80 | } | 78 | } |
81 | 79 | ||
82 | public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos) | 80 | public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos) |
83 | : base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) | 81 | : base(ownerID, localID, pos, PrimitiveBaseShape.Default) |
84 | { | 82 | { |
85 | m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f); | 83 | m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f); |
86 | 84 | ||
87 | AddPart( | 85 | AddPart( |
88 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, 0.75f), | 86 | new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, 0.75f), |
89 | new Quaternion(0.05f, 0, 0))); | 87 | new Quaternion(0.05f, 0, 0))); |
90 | AddPart( | 88 | AddPart( |
91 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, -0.75f), | 89 | new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, -0.75f), |
92 | new Quaternion(-0.05f, 0, 0))); | 90 | new Quaternion(-0.05f, 0, 0))); |
93 | 91 | ||
94 | AddPart( | 92 | AddPart( |
95 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0.75f, 0), | 93 | new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0.75f, 0), |
96 | new Quaternion(0.5f, 0, 0.05f))); | 94 | new Quaternion(0.5f, 0, 0.05f))); |
97 | AddPart( | 95 | AddPart( |
98 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, -0.75f, 0), | 96 | new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, -0.75f, 0), |
99 | new Quaternion(-0.5f, 0, -0.05f))); | 97 | new Quaternion(-0.5f, 0, -0.05f))); |
100 | 98 | ||
101 | AddPart( | 99 | AddPart( |
102 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0.75f, 0, 0), | 100 | new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0.75f, 0, 0), |
103 | new Quaternion(0, 0.5f, 0.05f))); | 101 | new Quaternion(0, 0.5f, 0.05f))); |
104 | AddPart( | 102 | AddPart( |
105 | new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(-0.75f, 0, 0), | 103 | new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(-0.75f, 0, 0), |
106 | new Quaternion(0, -0.5f, -0.05f))); | 104 | new Quaternion(0, -0.5f, -0.05f))); |
107 | 105 | ||
108 | RootPart.Flags |= PrimFlags.Touch; | 106 | RootPart.Flags |= PrimFlags.Touch; |