diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | 37 |
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 @@ | |||
1 | using OpenMetaverse; | ||
2 | using OpenSim.Region.Framework.Scenes; | ||
3 | |||
4 | namespace 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 | } | ||