aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs73
1 files changed, 68 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 637e090..b558bb2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -148,8 +148,34 @@ namespace OpenSim.Region.Environment.Scenes
148 148
149 public LLVector3 GroupPosition 149 public LLVector3 GroupPosition
150 { 150 {
151 get { return m_groupPosition; } 151 get
152 set { m_groupPosition = value; } 152 {
153 if (PhysActor != null)
154 {
155 m_groupPosition.X = PhysActor.Position.X;
156 m_groupPosition.Y = PhysActor.Position.Y;
157 m_groupPosition.Z = PhysActor.Position.Z;
158 }
159 return m_groupPosition;
160 }
161 set
162 {
163 if (PhysActor != null)
164 {
165 try
166 {
167 //lock (m_scene.SyncRoot)
168 //{
169 PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
170 //}
171 }
172 catch (Exception e)
173 {
174 Console.WriteLine(e.Message);
175 }
176 }
177 m_groupPosition = value;
178 }
153 } 179 }
154 180
155 protected LLVector3 m_offsetPosition; 181 protected LLVector3 m_offsetPosition;
@@ -169,8 +195,35 @@ namespace OpenSim.Region.Environment.Scenes
169 195
170 public LLQuaternion RotationOffset 196 public LLQuaternion RotationOffset
171 { 197 {
172 get { return m_rotationOffset; } 198 get
173 set { m_rotationOffset = value; } 199 {
200 if (PhysActor != null)
201 {
202 m_rotationOffset.X = PhysActor.Orientation.x;
203 m_rotationOffset.Y = PhysActor.Orientation.y;
204 m_rotationOffset.Z = PhysActor.Orientation.z;
205 m_rotationOffset.W = PhysActor.Orientation.w;
206 }
207 return m_rotationOffset;
208 }
209 set
210 {
211 if (PhysActor != null)
212 {
213 try
214 {
215 //lock (m_scene.SyncRoot)
216 //{
217 PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z);
218 //}
219 }
220 catch (Exception ex)
221 {
222 Console.WriteLine(ex.Message);
223 }
224 }
225 m_rotationOffset = value;
226 }
174 } 227 }
175 228
176 protected LLVector3 m_velocity; 229 protected LLVector3 m_velocity;
@@ -260,7 +313,12 @@ namespace OpenSim.Region.Environment.Scenes
260 public SceneObjectGroup ParentGroup 313 public SceneObjectGroup ParentGroup
261 { 314 {
262 get { return m_parentGroup; } 315 get { return m_parentGroup; }
263 316 }
317
318 public byte UpdateFlag
319 {
320 get { return m_updateFlag; }
321 set { m_updateFlag = value; }
264 } 322 }
265 323
266 #region Constructors 324 #region Constructors
@@ -502,6 +560,7 @@ namespace OpenSim.Region.Environment.Scenes
502 { 560 {
503 AddTerseUpdateToAllAvatars(); 561 AddTerseUpdateToAllAvatars();
504 ClearUpdateSchedule(); 562 ClearUpdateSchedule();
563 ScheduleTerseUpdate();
505 } 564 }
506 else 565 else
507 { 566 {
@@ -706,6 +765,10 @@ namespace OpenSim.Region.Environment.Scenes
706 new Quaternion(RotationOffset.W, RotationOffset.X, 765 new Quaternion(RotationOffset.W, RotationOffset.X,
707 RotationOffset.Y, RotationOffset.Z), UsePhysics); 766 RotationOffset.Y, RotationOffset.Z), UsePhysics);
708 } 767 }
768 else
769 {
770 PhysActor.IsPhysical = UsePhysics;
771 }
709 } 772 }
710 773
711 if (IsTemporary) 774 if (IsTemporary)