diff options
author | UbitUmarov | 2019-03-19 10:29:48 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-19 10:29:48 +0000 |
commit | 7884278097d49730606afca20cad60510a70269d (patch) | |
tree | e13ecf3c8b6f1bbfd4486897e0e429c41178f25f /OpenSim/Region/Framework | |
parent | lludp ObjectAnimation encoding (diff) | |
download | opensim-SC-7884278097d49730606afca20cad60510a70269d.zip opensim-SC-7884278097d49730606afca20cad60510a70269d.tar.gz opensim-SC-7884278097d49730606afca20cad60510a70269d.tar.bz2 opensim-SC-7884278097d49730606afca20cad60510a70269d.tar.xz |
try to avoid some useless full object updates
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 312ce26..edcdbd3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1038,8 +1038,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1038 | { | 1038 | { |
1039 | get | 1039 | get |
1040 | { | 1040 | { |
1041 | if (m_text.Length > 256) // yes > 254 | 1041 | if (m_text.Length > 254) |
1042 | return m_text.Substring(0, 256); | 1042 | return m_text.Substring(0, 254); |
1043 | return m_text; | 1043 | return m_text; |
1044 | } | 1044 | } |
1045 | set { m_text = value; } | 1045 | set { m_text = value; } |
@@ -4004,9 +4004,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4004 | /// <param name="text"></param> | 4004 | /// <param name="text"></param> |
4005 | public void SetText(string text) | 4005 | public void SetText(string text) |
4006 | { | 4006 | { |
4007 | Text = text; | 4007 | string oldtext = m_text; |
4008 | m_text = text; | ||
4008 | 4009 | ||
4009 | if (ParentGroup != null) | 4010 | if (ParentGroup != null && oldtext != text) |
4010 | { | 4011 | { |
4011 | ParentGroup.HasGroupChanged = true; | 4012 | ParentGroup.HasGroupChanged = true; |
4012 | ScheduleFullUpdate(); | 4013 | ScheduleFullUpdate(); |
@@ -4021,11 +4022,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4021 | /// <param name="alpha"></param> | 4022 | /// <param name="alpha"></param> |
4022 | public void SetText(string text, Vector3 color, double alpha) | 4023 | public void SetText(string text, Vector3 color, double alpha) |
4023 | { | 4024 | { |
4025 | Color oldcolor = Color; | ||
4026 | string oldtext = m_text; | ||
4024 | Color = Color.FromArgb((int) (alpha*0xff), | 4027 | Color = Color.FromArgb((int) (alpha*0xff), |
4025 | (int) (color.X*0xff), | 4028 | (int) (color.X*0xff), |
4026 | (int) (color.Y*0xff), | 4029 | (int) (color.Y*0xff), |
4027 | (int) (color.Z*0xff)); | 4030 | (int) (color.Z*0xff)); |
4028 | SetText(text); | 4031 | m_text = text; |
4032 | if(ParentGroup != null && (oldcolor != Color || oldtext != m_text)) | ||
4033 | { | ||
4034 | ParentGroup.HasGroupChanged = true; | ||
4035 | ScheduleFullUpdate(); | ||
4036 | } | ||
4029 | } | 4037 | } |
4030 | 4038 | ||
4031 | public void StoreUndoState(ObjectChangeType change) | 4039 | public void StoreUndoState(ObjectChangeType change) |