diff options
author | Sean Dague | 2008-07-16 18:29:03 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-16 18:29:03 +0000 |
commit | 58a0d0bb32a942b88a97e9d2be415e24db7fa197 (patch) | |
tree | b529d1036aebd8ced06b29a280a8e6ef99acbb26 /OpenSim/Region/Environment | |
parent | add pidb files to gitignore (diff) | |
download | opensim-SC-58a0d0bb32a942b88a97e9d2be415e24db7fa197.zip opensim-SC-58a0d0bb32a942b88a97e9d2be415e24db7fa197.tar.gz opensim-SC-58a0d0bb32a942b88a97e9d2be415e24db7fa197.tar.bz2 opensim-SC-58a0d0bb32a942b88a97e9d2be415e24db7fa197.tar.xz |
be a little more discriminating on firing ShapeChanged script events
so that we don't get them on every object construction.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 36d1f50..61300b5 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
191 | protected byte[] m_particleSystem = new byte[0]; | 191 | protected byte[] m_particleSystem = new byte[0]; |
192 | protected ulong m_regionHandle; | 192 | protected ulong m_regionHandle; |
193 | protected LLQuaternion m_rotationOffset; | 193 | protected LLQuaternion m_rotationOffset; |
194 | protected PrimitiveBaseShape m_shape; | 194 | protected PrimitiveBaseShape m_shape = null; |
195 | protected LLUUID m_uuid; | 195 | protected LLUUID m_uuid; |
196 | protected LLVector3 m_velocity; | 196 | protected LLVector3 m_velocity; |
197 | 197 | ||
@@ -696,8 +696,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
696 | get { return m_shape; } | 696 | get { return m_shape; } |
697 | set | 697 | set |
698 | { | 698 | { |
699 | bool shape_changed = false; | ||
700 | // TODO: this should really be restricted to the right | ||
701 | // set of attributes on shape change. For instance, | ||
702 | // changing the lighting on a shape shouldn't cause | ||
703 | // this. | ||
704 | if (m_shape != null) | ||
705 | shape_changed = true; | ||
706 | |||
699 | m_shape = value; | 707 | m_shape = value; |
700 | TriggerScriptChangedEvent(Changed.SHAPE); | 708 | |
709 | if (shape_changed) | ||
710 | TriggerScriptChangedEvent(Changed.SHAPE); | ||
701 | } | 711 | } |
702 | } | 712 | } |
703 | public LLVector3 Scale | 713 | public LLVector3 Scale |