aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs44
2 files changed, 41 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 28fce53..a2510a78 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5647,12 +5647,12 @@ Environment.Exit(1);
5647 List<SceneObjectGroup> objects, 5647 List<SceneObjectGroup> objects,
5648 out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ) 5648 out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ)
5649 { 5649 {
5650 minX = 256; 5650 minX = float.MaxValue;
5651 maxX = -256; 5651 maxX = float.MinValue;
5652 minY = 256; 5652 minY = float.MaxValue;
5653 maxY = -256; 5653 maxY = float.MinValue;
5654 minZ = 8192; 5654 minZ = float.MaxValue;
5655 maxZ = -256; 5655 maxZ = float.MinValue;
5656 5656
5657 List<Vector3> offsets = new List<Vector3>(); 5657 List<Vector3> offsets = new List<Vector3>();
5658 5658
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index ec7c3fa..9e644aa 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -5005,6 +5005,14 @@ namespace OpenSim.Region.Framework.Scenes
5005 oldTex.DefaultTexture = fallbackOldFace; 5005 oldTex.DefaultTexture = fallbackOldFace;
5006 } 5006 }
5007 5007
5008 // Materials capable viewers can send a ObjectImage packet
5009 // when nothing in TE has changed. MaterialID should be updated
5010 // by the RenderMaterials CAP handler, so updating it here may cause a
5011 // race condtion. Therefore, if no non-materials TE fields have changed,
5012 // we should ignore any changes and not update Shape.TextureEntry
5013
5014 bool otherFieldsChanged = false;
5015
5008 for (int i = 0 ; i < GetNumberOfSides(); i++) 5016 for (int i = 0 ; i < GetNumberOfSides(); i++)
5009 { 5017 {
5010 5018
@@ -5031,18 +5039,36 @@ namespace OpenSim.Region.Framework.Scenes
5031 // Max change, skip the rest of testing 5039 // Max change, skip the rest of testing
5032 if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) 5040 if (changeFlags == (Changed.TEXTURE | Changed.COLOR))
5033 break; 5041 break;
5042
5043 if (!otherFieldsChanged)
5044 {
5045 if (oldFace.Bump != newFace.Bump) otherFieldsChanged = true;
5046 if (oldFace.Fullbright != newFace.Fullbright) otherFieldsChanged = true;
5047 if (oldFace.Glow != newFace.Glow) otherFieldsChanged = true;
5048 if (oldFace.MediaFlags != newFace.MediaFlags) otherFieldsChanged = true;
5049 if (oldFace.OffsetU != newFace.OffsetU) otherFieldsChanged = true;
5050 if (oldFace.OffsetV != newFace.OffsetV) otherFieldsChanged = true;
5051 if (oldFace.RepeatU != newFace.RepeatU) otherFieldsChanged = true;
5052 if (oldFace.RepeatV != newFace.RepeatV) otherFieldsChanged = true;
5053 if (oldFace.Rotation != newFace.Rotation) otherFieldsChanged = true;
5054 if (oldFace.Shiny != newFace.Shiny) otherFieldsChanged = true;
5055 if (oldFace.TexMapType != newFace.TexMapType) otherFieldsChanged = true;
5056 }
5034 } 5057 }
5035 5058
5036 m_shape.TextureEntry = newTex.GetBytes(); 5059 if (changeFlags != 0 || otherFieldsChanged)
5037 if (changeFlags != 0) 5060 {
5038 TriggerScriptChangedEvent(changeFlags); 5061 m_shape.TextureEntry = newTex.GetBytes();
5039 UpdateFlag = UpdateRequired.FULL; 5062 if (changeFlags != 0)
5040 ParentGroup.HasGroupChanged = true; 5063 TriggerScriptChangedEvent(changeFlags);
5064 UpdateFlag = UpdateRequired.FULL;
5065 ParentGroup.HasGroupChanged = true;
5041 5066
5042 //This is madness.. 5067 //This is madness..
5043 //ParentGroup.ScheduleGroupForFullUpdate(); 5068 //ParentGroup.ScheduleGroupForFullUpdate();
5044 //This is sparta 5069 //This is sparta
5045 ScheduleFullUpdate(); 5070 ScheduleFullUpdate();
5071 }
5046 } 5072 }
5047 5073
5048 5074