aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs25
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index d6fb15b..084fb5f 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -75,22 +75,23 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule
75 75
76 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) 76 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
77 { 77 {
78 OSDMap attrs = null;
78 SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId); 79 SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId);
79 DAMap attrs = sop.DynAttrs; 80 if (!sop.DynAttrs.TryGetValue(Name, out attrs))
81 attrs = new OSDMap();
80 82
81 lock (attrs) 83 OSDInteger newValue;
82 {
83 OSDInteger newValue;
84 84
85 if (!attrs.ContainsKey("moves")) 85 if (!attrs.ContainsKey("moves"))
86 newValue = new OSDInteger(1); 86 newValue = new OSDInteger(1);
87 else 87 else
88 newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1); 88 newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1);
89 89
90 attrs["moves"] = newValue; 90 attrs["moves"] = newValue;
91 91
92 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue)); 92 sop.DynAttrs[Name] = attrs;
93 } 93
94 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue));
94 95
95 return true; 96 return true;
96 } 97 }