diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/DAMap.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/ExtraPhysicsData.cs (renamed from OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs) | 26 |
2 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs index 291c8b8..24e0895 100644 --- a/OpenSim/Framework/DAMap.cs +++ b/OpenSim/Framework/DAMap.cs | |||
@@ -168,6 +168,10 @@ namespace OpenSim.Framework | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
171 | /// <summary> | ||
172 | /// Validate the key used for storing separate data stores. | ||
173 | /// </summary> | ||
174 | /// <param name='key'></param> | ||
171 | private static void ValidateKey(string key) | 175 | private static void ValidateKey(string key) |
172 | { | 176 | { |
173 | if (key.Length < MIN_STORE_NAME_LENGTH) | 177 | if (key.Length < MIN_STORE_NAME_LENGTH) |
@@ -188,7 +192,8 @@ namespace OpenSim.Framework | |||
188 | } | 192 | } |
189 | 193 | ||
190 | public void Add(KeyValuePair<string, OSDMap> kvp) | 194 | public void Add(KeyValuePair<string, OSDMap> kvp) |
191 | { | 195 | { |
196 | ValidateKey(kvp.Key); | ||
192 | lock (this) | 197 | lock (this) |
193 | m_map.Add(kvp.Key, kvp.Value); | 198 | m_map.Add(kvp.Key, kvp.Value); |
194 | } | 199 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs b/OpenSim/Framework/ExtraPhysicsData.cs index f3be028..9e7334f 100644 --- a/OpenSim/Region/Framework/Scenes/Scripting/IScriptHost.cs +++ b/OpenSim/Framework/ExtraPhysicsData.cs | |||
@@ -27,20 +27,24 @@ | |||
27 | 27 | ||
28 | using OpenMetaverse; | 28 | using OpenMetaverse; |
29 | 29 | ||
30 | namespace OpenSim.Region.Framework.Scenes.Scripting | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public interface IScriptHost | 32 | public enum PhysShapeType : byte |
33 | { | 33 | { |
34 | string Name { get; set; } | 34 | prim = 0, |
35 | string Description { get; set; } | 35 | none = 1, |
36 | convex = 2, | ||
36 | 37 | ||
37 | UUID UUID { get; } | 38 | invalid = 255 // use to mark invalid data in ExtraPhysicsData |
38 | UUID OwnerID { get; } | 39 | } |
39 | UUID CreatorID { get; } | 40 | |
40 | Vector3 AbsolutePosition { get; } | 41 | public struct ExtraPhysicsData |
42 | { | ||
43 | public float Density; | ||
44 | public float GravitationModifier; | ||
45 | public float Friction; | ||
46 | public float Bounce; | ||
47 | public PhysShapeType PhysShapeType; | ||
41 | 48 | ||
42 | string SitName { get; set; } | ||
43 | string TouchName { get; set; } | ||
44 | void SetText(string text, Vector3 color, double alpha); | ||
45 | } | 49 | } |
46 | } | 50 | } |