aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs44
1 files changed, 35 insertions, 9 deletions
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