aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-04-01 06:55:39 +0000
committerAdam Frisby2009-04-01 06:55:39 +0000
commit7eccad05c9623d9fe80c29d3e30a6511caf00531 (patch)
treeef277c7c73cc9b9367f021924977fd2c09980c9d /OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
parent* Added NUnit tested utility function GetHashGuid() for future use. (diff)
downloadopensim-SC-7eccad05c9623d9fe80c29d3e30a6511caf00531.zip
opensim-SC-7eccad05c9623d9fe80c29d3e30a6511caf00531.tar.gz
opensim-SC-7eccad05c9623d9fe80c29d3e30a6511caf00531.tar.bz2
opensim-SC-7eccad05c9623d9fe80c29d3e30a6511caf00531.tar.xz
* Adds World.Avatars[] to MRM Scripting. Contains an enumerable array containing IAvatar instances for each avatar in the region.
* Adds Test/TestModule.cs which demonstrates a very quick and simple MRM Test.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
new file mode 100644
index 0000000..6011e0b
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -0,0 +1,37 @@
1using OpenMetaverse;
2using OpenSim.Region.Framework.Scenes;
3
4namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
5{
6 class SPAvatar : IAvatar
7 {
8 private readonly Scene m_rootScene;
9 private readonly UUID m_ID;
10
11 public SPAvatar(Scene scene, UUID ID)
12 {
13 m_rootScene = scene;
14 m_ID = ID;
15 }
16
17 private ScenePresence GetSP()
18 {
19 return m_rootScene.GetScenePresence(m_ID);
20 }
21
22 public string Name
23 {
24 get { return GetSP().Name; }
25 }
26
27 public UUID GlobalID
28 {
29 get { return m_ID; }
30 }
31
32 public Vector3 Position
33 {
34 get { return GetSP().AbsolutePosition; }
35 }
36 }
37}