aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs91
1 files changed, 58 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 261e958..8c6450d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -231,6 +231,13 @@ namespace OpenSim.Region.Framework.Scenes
231 231
232 public double SoundRadius; 232 public double SoundRadius;
233 233
234 /// <summary>
235 /// Should sounds played from this prim be queued?
236 /// </summary>
237 /// <remarks>
238 /// This should only be changed by sound modules. It is up to sound modules as to how they interpret this setting.
239 /// </remarks>
240 public bool SoundQueueing { get; set; }
234 241
235 public uint TimeStampFull; 242 public uint TimeStampFull;
236 243
@@ -1218,23 +1225,14 @@ namespace OpenSim.Region.Framework.Scenes
1218 // the mappings more consistant. 1225 // the mappings more consistant.
1219 public Vector3 SitTargetPositionLL 1226 public Vector3 SitTargetPositionLL
1220 { 1227 {
1221 get { return new Vector3(m_sitTargetPosition.X, m_sitTargetPosition.Y,m_sitTargetPosition.Z); } 1228 get { return m_sitTargetPosition; }
1222 set { m_sitTargetPosition = value; } 1229 set { m_sitTargetPosition = value; }
1223 } 1230 }
1224 1231
1225 public Quaternion SitTargetOrientationLL 1232 public Quaternion SitTargetOrientationLL
1226 { 1233 {
1227 get 1234 get { return m_sitTargetOrientation; }
1228 { 1235 set { m_sitTargetOrientation = value; }
1229 return new Quaternion(
1230 m_sitTargetOrientation.X,
1231 m_sitTargetOrientation.Y,
1232 m_sitTargetOrientation.Z,
1233 m_sitTargetOrientation.W
1234 );
1235 }
1236
1237 set { m_sitTargetOrientation = new Quaternion(value.X, value.Y, value.Z, value.W); }
1238 } 1236 }
1239 1237
1240 public bool Stopped 1238 public bool Stopped
@@ -4350,30 +4348,31 @@ namespace OpenSim.Region.Framework.Scenes
4350 } 4348 }
4351 } 4349 }
4352 4350
4353 public void UpdateGroupPosition(Vector3 pos) 4351 public void UpdateGroupPosition(Vector3 newPos)
4354 { 4352 {
4355 if ((pos.X != GroupPosition.X) || 4353 Vector3 oldPos = GroupPosition;
4356 (pos.Y != GroupPosition.Y) || 4354
4357 (pos.Z != GroupPosition.Z)) 4355 if ((newPos.X != oldPos.X) ||
4356 (newPos.Y != oldPos.Y) ||
4357 (newPos.Z != oldPos.Z))
4358 { 4358 {
4359 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
4360 GroupPosition = newPos; 4359 GroupPosition = newPos;
4361 ScheduleTerseUpdate(); 4360 ScheduleTerseUpdate();
4362 } 4361 }
4363 } 4362 }
4364 4363
4365 /// <summary> 4364 /// <summary>
4366 /// 4365 /// Update this part's offset position.
4367 /// </summary> 4366 /// </summary>
4368 /// <param name="pos"></param> 4367 /// <param name="pos"></param>
4369 public void UpdateOffSet(Vector3 pos) 4368 public void UpdateOffSet(Vector3 newPos)
4370 { 4369 {
4371 if ((pos.X != OffsetPosition.X) || 4370 Vector3 oldPos = OffsetPosition;
4372 (pos.Y != OffsetPosition.Y) ||
4373 (pos.Z != OffsetPosition.Z))
4374 {
4375 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
4376 4371
4372 if ((newPos.X != oldPos.X) ||
4373 (newPos.Y != oldPos.Y) ||
4374 (newPos.Z != oldPos.Z))
4375 {
4377 if (ParentGroup.RootPart.GetStatusSandbox()) 4376 if (ParentGroup.RootPart.GetStatusSandbox())
4378 { 4377 {
4379 if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10) 4378 if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10)
@@ -5014,6 +5013,14 @@ namespace OpenSim.Region.Framework.Scenes
5014 oldTex.DefaultTexture = fallbackOldFace; 5013 oldTex.DefaultTexture = fallbackOldFace;
5015 } 5014 }
5016 5015
5016 // Materials capable viewers can send a ObjectImage packet
5017 // when nothing in TE has changed. MaterialID should be updated
5018 // by the RenderMaterials CAP handler, so updating it here may cause a
5019 // race condtion. Therefore, if no non-materials TE fields have changed,
5020 // we should ignore any changes and not update Shape.TextureEntry
5021
5022 bool otherFieldsChanged = false;
5023
5017 for (int i = 0 ; i < GetNumberOfSides(); i++) 5024 for (int i = 0 ; i < GetNumberOfSides(); i++)
5018 { 5025 {
5019 5026
@@ -5040,18 +5047,36 @@ namespace OpenSim.Region.Framework.Scenes
5040 // Max change, skip the rest of testing 5047 // Max change, skip the rest of testing
5041 if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) 5048 if (changeFlags == (Changed.TEXTURE | Changed.COLOR))
5042 break; 5049 break;
5050
5051 if (!otherFieldsChanged)
5052 {
5053 if (oldFace.Bump != newFace.Bump) otherFieldsChanged = true;
5054 if (oldFace.Fullbright != newFace.Fullbright) otherFieldsChanged = true;
5055 if (oldFace.Glow != newFace.Glow) otherFieldsChanged = true;
5056 if (oldFace.MediaFlags != newFace.MediaFlags) otherFieldsChanged = true;
5057 if (oldFace.OffsetU != newFace.OffsetU) otherFieldsChanged = true;
5058 if (oldFace.OffsetV != newFace.OffsetV) otherFieldsChanged = true;
5059 if (oldFace.RepeatU != newFace.RepeatU) otherFieldsChanged = true;
5060 if (oldFace.RepeatV != newFace.RepeatV) otherFieldsChanged = true;
5061 if (oldFace.Rotation != newFace.Rotation) otherFieldsChanged = true;
5062 if (oldFace.Shiny != newFace.Shiny) otherFieldsChanged = true;
5063 if (oldFace.TexMapType != newFace.TexMapType) otherFieldsChanged = true;
5064 }
5043 } 5065 }
5044 5066
5045 m_shape.TextureEntry = newTex.GetBytes(); 5067 if (changeFlags != 0 || otherFieldsChanged)
5046 if (changeFlags != 0) 5068 {
5047 TriggerScriptChangedEvent(changeFlags); 5069 m_shape.TextureEntry = newTex.GetBytes();
5048 UpdateFlag = UpdateRequired.FULL; 5070 if (changeFlags != 0)
5049 ParentGroup.HasGroupChanged = true; 5071 TriggerScriptChangedEvent(changeFlags);
5072 UpdateFlag = UpdateRequired.FULL;
5073 ParentGroup.HasGroupChanged = true;
5050 5074
5051 //This is madness.. 5075 //This is madness..
5052 //ParentGroup.ScheduleGroupForFullUpdate(); 5076 //ParentGroup.ScheduleGroupForFullUpdate();
5053 //This is sparta 5077 //This is sparta
5054 ScheduleFullUpdate(); 5078 ScheduleFullUpdate();
5079 }
5055 } 5080 }
5056 5081
5057 5082